Commit b1c951cf authored by jhugues's avatar jhugues
Browse files

* Update driver library to match requirements for the ASN.1-based

	configuration mechanism



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2525 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent d458a1a5
......@@ -2,31 +2,32 @@ package ocarina_drivers
public
with deployment;
with ocarina_buses;
with Data_Model;
with Base_Types;
with ocarina_drivers_leon_serial;
with ocarina_drivers_rasta_1553;
with ocarina_drivers_rasta_serial;
with ocarina_drivers_rasta_spacewire;
with ocarina_drivers_rtems_ne2000;
with ocarina_drivers_udp_exarm;
with ocarina_drivers_serial;
with ocarina_drivers_ip_pohic;
with ocarina_drivers_exarm_ni_6071e_analog;
with ocarina_drivers_exarm_ni_6071e_digital;
with ocarina_drivers_generic_keyboard;
with GRUART;
with GRSPW;
with Native_UART;
with TCP_IP_Protocol;
------------------------
......@@ -60,7 +61,7 @@ public
--------------
-- Keyboard --
--------------
device generic_keyboard
features
key_pressed : out data port Base_Types::Character;
......@@ -69,20 +70,20 @@ public
Device_Driver => classifier (ocarina_drivers_generic_keyboard::generic_keyboard_driver.i);
Initialize_Entrypoint => classifier (ocarina_drivers_generic_keyboard::spg_generic_keyboard_init);
end generic_keyboard;
device implementation generic_keyboard.linux
end generic_keyboard.linux;
------------------
-- RASTA SERIAL --
------------------
device leon_serial
features
serialaccess : requires bus access ocarina_buses::serial.generic;
end leon_serial;
device implementation leon_serial.raw
properties
Deployment::Driver_Name => "serial_leon";
......@@ -102,10 +103,10 @@ public
----------------
-- RASTA 1553 --
----------------
device rasta_1553
end rasta_1553;
device implementation rasta_1553.terminal
properties
Deployment::Driver_Name => "1553_rasta";
......@@ -113,7 +114,7 @@ public
Initialize_Entrypoint => classifier (ocarina_drivers_rasta_1553::spg_1553_init_rasta_terminal);
Provided_Virtual_Bus_Class => (classifier (ocarina_buses::pohi.c));
end rasta_1553.terminal;
device implementation rasta_1553.controller_sender_only
properties
Deployment::Driver_Name => "1553_rasta";
......@@ -121,16 +122,16 @@ public
Initialize_Entrypoint => classifier (ocarina_drivers_rasta_1553::spg_1553_init_rasta_controller);
Provided_Virtual_Bus_Class => (classifier (ocarina_buses::pohi.c));
end rasta_1553.controller_sender_only;
------------------
-- RASTA SERIAL --
------------------
device rasta_serial
features
serialaccess : requires bus access ocarina_buses::serial.generic;
end rasta_serial;
device implementation rasta_serial.raw
properties
Deployment::Driver_Name => "serial_rasta";
......@@ -155,7 +156,7 @@ public
features
spwaccess : requires bus access ocarina_buses::spacewire.generic;
end rasta_spacewire;
device implementation rasta_spacewire.pohic
properties
Deployment::Driver_Name => "spacewire_rasta";
......@@ -180,7 +181,7 @@ public
features
serialaccess : requires bus access ocarina_buses::serial.generic;
end generic_serial;
device implementation generic_serial.raw
properties
Deployment::Driver_Name => "serial_linux";
......@@ -189,6 +190,15 @@ public
Provided_Virtual_Bus_Class => (classifier (ocarina_buses::raw.i));
end generic_serial.raw;
device implementation generic_serial.pohiada
properties
Deployment::Driver_Name => "serial_linux";
Implemented_As =>
classifier (Native_UART::Driver_Native_UART_Protocol.impl);
Initialize_Entrypoint => classifier (Native_UART::Initialize);
Provided_Virtual_Bus_Class => (classifier (ocarina_buses::raw.i));
end generic_serial.pohiada;
device implementation generic_serial.raw_sender
properties
Deployment::Driver_Name => "serial_linux_sender";
......@@ -196,7 +206,7 @@ public
Initialize_Entrypoint => classifier (ocarina_drivers_serial::spg_serial_init_linux_sender);
Provided_Virtual_Bus_Class => (classifier (ocarina_buses::raw.i));
end generic_serial.raw_sender;
device implementation generic_serial.raw_receiver
properties
Deployment::Driver_Name => "serial_linux_receiver";
......@@ -213,7 +223,7 @@ public
features
thebus : requires bus access ocarina_buses::ip.i;
end generic_sockets_ip;
device implementation generic_sockets_ip.pohic
properties
Deployment::Driver_Name => "sockets";
......@@ -238,7 +248,7 @@ public
features
thebus : requires bus access ocarina_buses::ip.i;
end rtems_ne2000;
device implementation rtems_ne2000.ip_pohic
properties
Deployment::Driver_Name => "rtems_ne2000_sockets";
......@@ -254,27 +264,27 @@ public
-- with the exarm robot and also --
-- the Matlab simulator. --
------------------------------------------
device exarm_ip
features
thebus : requires bus access ocarina_buses::ip.i;
end exarm_ip;
device implementation exarm_ip.vr_udp
properties
Deployment::Driver_Name => "exarm";
Device_Driver => classifier (ocarina_drivers_udp_exarm::driver.i);
Initialize_Entrypoint => classifier (ocarina_drivers_udp_exarm::init);
end exarm_ip.vr_udp;
data exarm_protocol_data
end exarm_protocol_data;
data implementation exarm_protocol_data.vr extends ocarina_drivers_udp_exarm::protocol.vr
properties
Data_Model::Data_Representation => Struct;
end exarm_protocol_data.vr;
data implementation exarm_protocol_data.robot extends ocarina_drivers_udp_exarm::protocol.robot
properties
Data_Model::Data_Representation => Struct;
......@@ -287,7 +297,7 @@ public
-- This device is used to make data --
-- acquisition of the EXARM robot. --
---------------------------------------
device exarm_ni_6071e_analog
features
data1 : out data port Base_Types::Float_64;
......
......@@ -9,10 +9,10 @@ public
-- devices. It is not used by the code generation process, so it is
-- made fully generic.
bus GenericBus
end GenericBus;
bus Generic_Bus
end Generic_Bus;
bus implementation GenericBus.impl
end GenericBus.impl;
bus implementation Generic_Bus.impl
end Generic_Bus.impl;
end Generic_Bus;
......@@ -7,6 +7,7 @@ package Generic_Native
public
with Deployment;
with Generic_Bus;
---------------
-- PROCESSOR --
......@@ -19,7 +20,7 @@ public
processor Generic_Processor
features
eth0_tcp_ip : requires bus access Generic_Bus.impl;
eth0_tcp_ip : requires bus access Generic_Bus::Generic_Bus.impl;
-- One ethernet card, connected to the processor. It is assumed
-- later that it is used through a TCP/IP stack
......@@ -42,18 +43,4 @@ public
memory implementation Memory_Segment.impl
end Memory_Segment.impl;
---------
-- BUS --
---------
-- Generic bus to model connections between processors and
-- devices. It is not used by the code generation process, so it is
-- made fully generic.
bus Generic_Bus
end Generic_Bus;
bus implementation Generic_Bus.impl
end Generic_Bus.impl;
end Generic_Native;
\ No newline at end of file
end Generic_Native;
......@@ -19,9 +19,9 @@ public
processor LEON2
features
spw_core_1 : requires bus access Generic_Bus::GenericBus.impl;
spw_core_2 : requires bus access Generic_Bus::GenericBus.impl;
spw_core_3 : requires bus access Generic_Bus::GenericBus.impl;
spw_core_1 : requires bus access Generic_Bus::Generic_Bus.impl;
spw_core_2 : requires bus access Generic_Bus::Generic_Bus.impl;
spw_core_3 : requires bus access Generic_Bus::Generic_Bus.impl;
-- Three SpaceWire cores
-- XXX Add UARTS
......
......@@ -6,20 +6,20 @@ package GRSPW
-- integrated with the runtime low level interface.
--
-- To configure this interface, you should use the
-- Deployment::Configuration property with the following format:
-- Deployment::Configuration property with the following format:
-- "spacewire Sender_Core_id Receiver_Core_Id"
--
-- e.g.
--
-- spw : device GRSPW::GRSPW_Device
-- {Deployment::Configuration => "spacewire 1 2"};
--
--
public
with Deployment;
with GR_CPCI_X4CV;
with Generic_Bus;
with Deployment;
------------
-- DEVICE --
......@@ -31,14 +31,14 @@ public
device GRSPW_Device
features
LVDS_Wire : requires bus access Generic_Bus::GenericBus.impl;
-- Connection to the remote node
LVDS_Wire : requires bus access Generic_Bus::Generic_Bus.impl;
-- Connection to the remote node
end GRSPW_Device;
device implementation GRSPW_Device.impl
properties
Implemented_As =>
Implemented_As =>
classifier (GRSPW::Driver_GRSPW_Protocol.impl);
Initialize_Entrypoint => classifier (GRSPW::Initialize);
end GRSPW_Device.impl;
......@@ -59,6 +59,7 @@ public
abstract implementation Driver_GRSPW_Protocol.impl
subcomponents
receiver : thread Driver_GRSPW_Protocol_thread_receiver.impl;
sender : subprogram Send;
end Driver_GRSPW_Protocol.impl;
-------------
......@@ -70,7 +71,7 @@ public
-- messages.
thread Driver_GRSPW_Protocol_thread_receiver
-- This thread is dispatched when an event is detected on the
-- real hardware. It then calls receive to handle the incoming
-- event.
......@@ -81,7 +82,7 @@ public
end Driver_GRSPW_Protocol_thread_receiver;
thread implementation Driver_GRSPW_Protocol_thread_receiver.impl
calls
calls
call1 : { pspg : subprogram receive; };
end Driver_GRSPW_Protocol_thread_receiver.impl;
......
......@@ -6,19 +6,20 @@ package GRUART
-- integrated with the runtime low level interface.
--
-- To configure this interface, you should use the
-- Deployment::Configuration property with the following format:
-- Deployment::Configuration property with the following format:
-- "serial DEVICE BAUDS DATA_BITS PARITY STOP_BIT"
--
-- e.g.
--
-- uart : device GRUART::GRUART_Device
-- {Deployment::Configuration => "serial /dev/ttyS0 9600 8 N 1"
--
--
public
with Generic_Bus;
with Deployment;
with GR_CPCI_X4CV;
with Generic_Bus;
------------
-- DEVICE --
......@@ -30,14 +31,14 @@ public
device GRUART_Device
features
DB9_Wire : requires bus access Generic_Bus::GenericBus.impl;
-- Connection to the remote node
DB9_Wire : requires bus access Generic_Bus::Generic_Bus.impl;
-- Connection to the remote node
end GRUART_Device;
device implementation GRUART_Device.impl
properties
Implemented_As =>
Implemented_As =>
classifier (GRUART::Driver_GRUART_Protocol.impl);
Initialize_Entrypoint => classifier (GRUART::Initialize);
end GRUART_Device.impl;
......@@ -51,6 +52,8 @@ public
abstract Driver_GRUART_Protocol
properties
Deployment::Configuration_Type
=> classifier (ocarina_drivers::configuration_type_serial);
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end Driver_GRUART_Protocol;
......@@ -58,6 +61,7 @@ public
abstract implementation Driver_GRUART_Protocol.impl
subcomponents
receiver : thread Driver_GRUART_Protocol_thread_receiver.impl;
sender : subprogram Send;
end Driver_GRUART_Protocol.impl;
-------------
......@@ -69,7 +73,7 @@ public
-- messages.
thread Driver_GRUART_Protocol_thread_receiver
-- This thread is dispatched when an event is detected on the
-- real hardware. It then calls receive to handle the incoming
-- event.
......@@ -81,7 +85,7 @@ public
end Driver_GRUART_Protocol_thread_receiver;
thread implementation Driver_GRUART_Protocol_thread_receiver.impl
calls
calls
call1 : { pspg : subprogram receive; };
end Driver_GRUART_Protocol_thread_receiver.impl;
......
......@@ -5,19 +5,19 @@ package Native_UART
-- integrated with the runtime low level interface.
--
-- To configure this interface, you should use the
-- Deployment::Configuration property with the following format:
-- Deployment::Configuration property with the following format:
-- "serial DEVICE BAUDS DATA_BITS PARITY STOP_BIT"
--
-- e.g.
--
-- uart : device GRUART::GRUART_Device
-- {Deployment::Configuration => "serial /dev/ttyS0 9600 8 N 1"
--
--
public
with Generic_Bus;
with Deployment;
with Generic_Bus;
------------
-- DEVICE --
......@@ -29,14 +29,14 @@ public
device Native_UART_Device
features
DB9_Wire : requires bus access Generic_Bus::GenericBus.impl;
-- Connection to the remote node
DB9_Wire : requires bus access Generic_Bus::Generic_Bus.impl;
-- Connection to the remote node
end Native_UART_Device;
device implementation Native_UART_Device.impl
properties
Implemented_As =>
Implemented_As =>
classifier (Native_UART::Driver_Native_UART_Protocol.impl);
Initialize_Entrypoint => classifier (Native_UART::Initialize);
end Native_UART_Device.impl;
......@@ -50,6 +50,8 @@ public
abstract Driver_Native_UART_Protocol
properties
Deployment::Configuration_Type
=> classifier (ocarina_drivers::configuration_type_serial);
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end Driver_Native_UART_Protocol;
......@@ -57,6 +59,7 @@ public
abstract implementation Driver_Native_UART_Protocol.impl
subcomponents
receiver : thread Driver_Native_UART_Protocol_thread_receiver.impl;
sender : subprogram Send;
end Driver_Native_UART_Protocol.impl;
-------------
......@@ -68,7 +71,7 @@ public
-- messages.
thread Driver_Native_UART_Protocol_thread_receiver
-- This thread is dispatched when an event is detected on the
-- real hardware. It then calls receive to handle the incoming
-- event.
......@@ -80,7 +83,7 @@ public
end Driver_Native_UART_Protocol_thread_receiver;
thread implementation Driver_Native_UART_Protocol_thread_receiver.impl
calls
calls
call1 : { pspg : subprogram receive; };
end Driver_Native_UART_Protocol_thread_receiver.impl;
......
......@@ -5,7 +5,7 @@ package TCP_IP_Protocol
-- to be integrated with the runtime low level interface.
--
-- To configure this interface, you should use the
-- Deployment::Configuration property with the following format:
-- Deployment::Configuration property with the following format:
-- "ip <ipv4_addresse> <ipv4_port>"
--
-- e.g.
......@@ -15,8 +15,7 @@ package TCP_IP_Protocol
public
with Generic_Native;
with Deployment;
with Generic_Bus;
------------
-- DEVICE --
......@@ -28,14 +27,14 @@ public
device TCP_IP_Device
features
Ethernet_Wire : requires bus access Generic_Native::Generic_Bus.impl;
-- Connection to the remote node
Ethernet_Wire : requires bus access Generic_Bus::Generic_Bus.impl;
-- Connection to the remote node
end TCP_IP_Device;
device implementation TCP_IP_Device.impl
properties
Implemented_As =>
Implemented_As =>
classifier (TCP_IP_Protocol::Driver_TCP_IP_Protocol.impl);
Initialize_Entrypoint => classifier (TCP_IP_Protocol::Initialize);
end TCP_IP_Device.impl;
......@@ -48,14 +47,12 @@ public
-- using an abstract component.
abstract Driver_TCP_IP_Protocol
properties
Deployment::Version => "0.1beta";
Deployment::Help => "Write your ASN.1 configuration here";
end Driver_TCP_IP_Protocol;
abstract implementation Driver_TCP_IP_Protocol.impl
subcomponents
receiver : thread Driver_TCP_IP_Protocol_thread_receiver.impl;
sender : subprogram Send;
end Driver_TCP_IP_Protocol.impl;
-------------
......@@ -67,19 +64,19 @@ public
-- messages.
thread Driver_TCP_IP_Protocol_thread_receiver
-- This thread is dispatched when an event is detected on the
-- real hardware. It then calls receive to handle the incoming
-- event.
properties
-- Initialize_Entrypoint
-- Initialize_Entrypoint
-- => classifier (TCP_IP_Protocol::Initialize_Receiver);
Dispatch_Protocol => Background;
end Driver_TCP_IP_Protocol_thread_receiver;
thread implementation Driver_TCP_IP_Protocol_thread_receiver.impl
calls
calls
call1 : { pspg : subprogram receive; };
end Driver_TCP_IP_Protocol_thread_receiver.impl;
......
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