Commit b4bdc962 authored by julien.delange's avatar julien.delange

* The "yes we can" commit

 * po-hi-c/include/drivers/configuration
   po-hi-c/include/drivers/configuration/Makefile.am
   - Automatically package header files generated
     by asn1.exe

 * po-hi-c/include/drivers/Makefile.am
   - Package files generated in the configuration/
     subdirectory

 * po-hi-c/src/drivers/configuration
   po-hi-c/src/drivers/configuration/serial.asn
   po-hi-c/src/drivers/configuration/spacewire.asn
   po-hi-c/src/drivers/configuration/main.asn
   po-hi-c/src/drivers/configuration/ip.asn
   po-hi-c/src/drivers/configuration/1553.asn
   - Add device driver configuration specification
     in ASN.1

 * po-hi-c/src/drivers/configuration/Makefile.am
   - Add rules for packaging .c/.h files generated
     by asn.1
   - Add generation rules to generate source file
     from asn.1 files

 * po-hi-c/src/drivers/Makefile.am
   - Package files generated in the configuration/
     subdirectory

 * po-hi-c/configure.ac
   - Produce Makefile in new configuration directories.

 * po-hi-c/Makefile.am
   - Fix error with the doc/ directory
   - Add the generate-driver-configuration target
     to force the generation of .c/.h files from ASN.1
     description



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2027 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 7124201f
AUTOMAKE_OPTIONS = no-dependencies
CLEANFILES = config-stamp svn-commit*.tmp* *~
SUBDIRS = src support tools share include @DOC_DIR@
SUBDIRS = src support tools share include doc
DIST_SUBDIRS = $(SUBDIRS) examples
check-local:: examples
......@@ -17,6 +17,9 @@ clean-examples::
distclean-examples::
$(MAKE) -C examples distclean
generate-driver-configuration::
$(MAKE) -C src/drivers/configuration regenerate
po_hi_doc_dir = ${shell $(CYGPATH_U) '$(OCARINA_PREFIX)/share/doc/ocarina'}
install-data-local:
......
......@@ -150,8 +150,10 @@ AC_OUTPUT([
doc/Makefile
src/Makefile
src/drivers/Makefile
src/drivers/configuration/Makefile
include/Makefile
include/drivers/Makefile
include/drivers/configuration/Makefile
examples/Makefile
examples/aadlv1/Makefile
examples/aadlv1/d3.1.3-1/Makefile
......
......@@ -16,9 +16,10 @@ EXTRA_DIST = $(srcdir)/po_hi_driver_linux_serial.h \
$(srcdir)/po_hi_driver_sockets_common.h \
$(srcdir)/po_hi_driver_sockets_asn1.h \
$(srcdir)/po_hi_rtems_utils.h
CLEANFILES = *~
SUBDIRS=configuration
hsrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/include/drivers'}
install-data-local:
......
AUTOMAKE_OPTIONS = no-dependencies
EXTRA_DIST = $(srcdir)/asn1crt.h \
$(srcdir)/1553.h \
$(srcdir)/ip.h \
$(srcdir)/serial.h\
$(srcdir)/spacewire.h
hsrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/include/drivers/configuration'}
install-data-local:
$(INSTALL) -d $(DESTDIR)$(hsrc)
for f in $(EXTRA_DIST); do \
$(INSTALL) -m 444 $$f $(DESTDIR)$(hsrc) ; \
done
uninstall-local:
rm -rf $(DESTDIR)$(hsrc)
CLEANFILES = *~ $(EXTRA_DIST)
AUTOMAKE_OPTIONS = no-dependencies
SUBDIRS=configuration
C_FILES = $(srcdir)/po_hi_driver_linux_serial.c \
$(srcdir)/po_hi_driver_leon_serial.c \
$(srcdir)/po_hi_driver_sockets.c \
......
POHICDRIVER-1553 DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Node-Addr-T ::= INTEGER (0 .. 31)
Standard-T ::= ENUMERATED {mil1553a, mil1553b}
Mode-T ::= ENUMERATED {controller, terminal, monitor}
Bus-T ::= ENUMERATED {none, bus-a, bus-b, both}
Mil-1553-Conf-T ::= SEQUENCE {
devname IA5String (SIZE (1..20)),
standard Standard-T,
mode Mode-T,
bus Bus-T,
termaddr Node-Addr-T,
broadcast BOOLEAN,
rxblock BOOLEAN OPTIONAL,
txblock BOOLEAN OPTIONAL
}
END
AUTOMAKE_OPTIONS = no-dependencies
C_FILES = $(srcdir)/1553.c \
$(srcdir)/ip.c \
$(srcdir)/serial.c \
$(srcdir)/spacewire.c
csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers/configuration'}
$(srcdir)/1553.c:
asn1.exe -c -typePrefix __po_hi_c_ 1553.asn
mv 1553.h ../../../include/drivers/configuration/
mv asn1crt.h ../../../include/drivers/configuration/
$(srcdir)/spacewire.c:
asn1.exe -c -typePrefix __po_hi_c_ spacewire.asn
mv spacewire.h ../../../include/drivers/configuration/
mv asn1crt.h ../../../include/drivers/configuration/
$(srcdir)/ip.c:
asn1.exe -c -typePrefix __po_hi_c_ ip.asn
mv ip.h ../../../include/drivers/configuration/
mv asn1crt.h ../../../include/drivers/configuration/
$(srcdir)/serial.c:
asn1.exe -c -typePrefix __po_hi_c_ serial.asn
mv serial.h ../../../include/drivers/configuration/
mv asn1crt.h ../../../include/drivers/configuration/
regenerate:
rm -f $(C_FILES)
for v in $(C_FILES); do $(MAKE) $$v ; done
install-data-local:
$(INSTALL) -d $(DESTDIR)$(csrc)
for f in $(C_FILES); do $(INSTALL) -m 444 $$f $(DESTDIR)$(csrc) ; done
uninstall-local:
rm -rf $(DESTDIR)$(csrc)
EXTRA_DIST = $(C_FILES)
CLEANFILES = *~ $(C_FILES)
POHICDRIVER-IP DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Ip-Address-T ::= SEQUENCE (SIZE (4)) OF INTEGER (0 .. 255)
Port-T ::= INTEGER (0 .. 16535)
IP-Conf-T ::= SEQUENCE {
devname IA5String (SIZE (1..20)),
address Ip-Address-T,
port Port-T
}
END
POHICDRIVER DEFINITIONS AUTOMATIC TAGS ::= BEGIN
IMPORTS IP-Conf-T FROM POHICDRIVER-IP
Spacewire-Conf-T FROM POHICDRIVER-SPACEWIRE
Serial-Conf-T FROM POHICDRIVER-UART;
Driver-T ::= CHOICE {
ip IP-Conf-T,
serial Serial-Conf-T,
spw Spacewire-Conf-T
}
END
POHICDRIVER-UART DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Baudrate-T ::= ENUMERATED
{b9600,
b19200,
b38400,
b57600,
b115200,
b230400}
Parity-T ::= ENUMERATED {even, odd}
Serial-Conf-T ::= SEQUENCE {
devname IA5String (SIZE (1..20)),
speed Baudrate-T OPTIONAL,
parity Parity-T OPTIONAL,
bits INTEGER (7 .. 8) OPTIONAL,
use-paritybit BOOLEAN OPTIONAL
}
END
POHICDRIVER-SPACEWIRE DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Core-Frequence-T ::= INTEGER (0 .. 4294967295)
Node-Addr-T ::= INTEGER (0 .. 255)
Clock-Division-T ::= INTEGER (0 .. 255)
Spacewire-Conf-T ::= SEQUENCE {
devname IA5String (SIZE (1..20)),
nodeaddr Node-Addr-T,
corefreq Core-Frequence-T,
clockdiv Clock-Division-T,
remove-prot-id BOOLEAN OPTIONAL,
rxblock BOOLEAN OPTIONAL,
txblock BOOLEAN OPTIONAL
}
END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment