Commit dc086804 authored by TASTE User's avatar TASTE User
Browse files

add tc[2,1] to data model

parent f5ffebba
This diff is collapsed.
......@@ -4,6 +4,7 @@ END
Taps DEFINITIONS ::= BEGIN
APID[encoding pos-int, encode-values, size 11]
APUserID[encoding pos-int, encode-values, size 16]
On-off-dev-addr[encoding pos-int, encode-values, size 32]
CPDU-output-line-ID[]
CPDU-Ids[]
Pulse-Instr-Instance[] {
......@@ -11,10 +12,12 @@ Taps DEFINITIONS ::= BEGIN
reserved NULL [pattern '0'B],
duration-exp-value []
}
TC-2-1 []
TC-2-4 []
TYPE8b-ID[encoding pos-int, size 8]
TCs <TYPE8b-ID: tc-type, TYPE8b-ID: tc-subtype> [] {
tc2-1 [present-when tc-type==2 tc-subtype==1],
tc2-4 [present-when tc-type==2 tc-subtype==4]
}
......
......@@ -25,6 +25,12 @@ TC-Secondary-Header {APUserID} ::= SEQUENCE {
END
-- Generic definition for TC 2-1 - Distribute on/off device commands from PUS-C
Distribute-On-Off-Device-Commands-Generic DEFINITIONS ::=
BEGIN
On-Off-Device-Command{ On-off-dev-addr, INTEGER: addrsNo} ::= SEQUENCE (SIZE(1..addrsNo)) OF On-off-dev-addr
END
-- Generic definition for TC 2-4 - Distribute CPDU Commands from PUS-C
Distribute-CPDU-Commands-Generic DEFINITIONS ::=
......@@ -49,8 +55,10 @@ Taps DEFINITIONS ::=
BEGIN
IMPORTS Pulse-Instruction,
CPDU-Command,
Distribute-CPDU-Commands
Distribute-CPDU-Commands
FROM Distribute-CPDU-Commands-Generic
On-Off-Device-Command
FROM Distribute-On-Off-Device-Commands-Generic
TC-type,
TM-type
FROM PUS-Implicit-Knowledge;
......@@ -74,6 +82,21 @@ APUserID ::= ENUMERATED { --let ACN manage the "16 bits" constraint
sc-cpdu-User(5)
}
-- On-off device addresses , ACN manage the "32 bits" constraint
On-off-dev-addr ::= ENUMERATED {
onAddr(61136),
offAddr(61140),
coldResetAddr(61144),
warmResetAddr(61148)
}
-- Maximum number of On/Off device addresses commands (!bounds constraints not found in PUS-C)
addrsNo INTEGER (1..128) ::= 4
-- Instantiate the TC-2-1
TC-2-1 ::= On-Off-Device-Command{On-off-dev-addr, addrsNo}
---------------------
-- CPDU output Identifier defined in 9.2.1d
CPDU-output-line-ID ::= INTEGER { cpdu-line1(1), cpdu-line2(2)} (0..4095)
......@@ -94,6 +117,7 @@ TC-2-4 ::= Distribute-CPDU-Commands {CPDU-Cmd, max-CPDU-Cmds}
-- Instantiate the project list of TC
TCs ::= CHOICE {
tc2-1 TC-2-1,
tc2-4 TC-2-4
}
......
......@@ -171,9 +171,11 @@ CONNECTIONS
};
PROPERTIES
Actual_Connection_Binding => (reference (ip_i)) APPLIES TO interfaceview.ST01_routing_testI_ground_testI;
Taste::Coordinates => "313 568 439 711" APPLIES TO interfaceview.ST01_routing_testI_ground_testI;
Taste::Coordinates => "298 735 440 861" APPLIES TO interfaceview.ST01_routing_testI_ground_testI;
Actual_Connection_Binding => (reference (ip_i)) APPLIES TO interfaceview.ground_test_TM_ST01_routing_test_TM;
Taste::Coordinates => "342 799 461 903" APPLIES TO interfaceview.ground_test_TM_ST01_routing_test_TM;
Taste::Coordinates => "329 1127 433 1215" APPLIES TO interfaceview.ground_test_TM_ST01_routing_test_TM;
Actual_Connection_Binding => (reference (ip_i)) APPLIES TO interfaceview.ST01_routing_TC_test_ground_TC_test;
Taste::Coordinates => "332 492 449 641" APPLIES TO interfaceview.ST01_routing_TC_test_ground_TC_test;
END deploymentview.others;
PROPERTIES
......
......@@ -33,6 +33,16 @@ END RI_testI;
SUBPROGRAM IMPLEMENTATION RI_testI.others
END RI_testI.others;
SUBPROGRAM RI_TC_test
FEATURES
TC : IN PARAMETER DataView::Telecommand {
Taste::encoding => NATIVE;
};
END RI_TC_test;
SUBPROGRAM IMPLEMENTATION RI_TC_test.others
END RI_TC_test.others;
END interfaceview::FV::ground;
PACKAGE interfaceview::FV::ST01_routing
......@@ -73,6 +83,18 @@ END RI_test_TM;
SUBPROGRAM IMPLEMENTATION RI_test_TM.others
END RI_test_TM.others;
SUBPROGRAM PI_TC_test
FEATURES
TC : IN PARAMETER DataView::Telecommand {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TC_test;
SUBPROGRAM IMPLEMENTATION PI_TC_test.others
END PI_TC_test.others;
END interfaceview::FV::ST01_routing;
PACKAGE interfaceview::FV::ST02_device_access
......@@ -120,6 +142,12 @@ FEATURES
Taste::InterfaceName => "testI";
Taste::labelInheritance => "true";
};
RI_TC_test : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::ST01_routing::PI_TC_test.others {
Taste::coordinates => "749 1734";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "TC_test";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (GUI);
END ground;
......@@ -154,6 +182,11 @@ FEATURES
Taste::InterfaceName => "test_TM";
Taste::labelInheritance => "true";
};
PI_TC_test : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::ST01_routing::PI_TC_test.others {
Taste::coordinates => "667 1263";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "TC_test";
};
PROPERTIES
Source_Language => (SDL);
END ST01_routing;
......@@ -163,8 +196,12 @@ SUBCOMPONENTS
testI_impl : SUBPROGRAM interfaceview::FV::ST01_routing::PI_testI.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
TC_test_impl : SUBPROGRAM interfaceview::FV::ST01_routing::PI_TC_test.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
CONNECTIONS
OpToPICnx_testI_impl : SUBPROGRAM ACCESS testI_impl -> PI_testI;
OpToPICnx_TC_test_impl : SUBPROGRAM ACCESS TC_test_impl -> PI_TC_test;
END ST01_routing.others;
SYSTEM ST02_device_access
......@@ -210,6 +247,9 @@ CONNECTIONS
ST01_routing_testI_ground_testI : SUBPROGRAM ACCESS ST01_routing.PI_testI -> ground.RI_testI {
Taste::coordinates => "1180 1734 1180 1498 1405 1498 1405 1263";
};
ST01_routing_TC_test_ground_TC_test : SUBPROGRAM ACCESS ST01_routing.PI_TC_test -> ground.RI_TC_test {
Taste::coordinates => "749 1734 749 1498 667 1498 667 1263";
};
ST02_device_access_testRouting_ST01_routing_testRouting : SUBPROGRAM ACCESS ST02_device_access.PI_testRouting -> ST01_routing.RI_testRouting {
Taste::coordinates => "523 951 523 772 575 772 575 594";
};
......
38de3ac373e568a10a91d3396368a570 InterfaceView.aadl
f20500ea1a15b7581e819a468398f01c InterfaceView.aadl
......@@ -56,16 +56,16 @@ SKELS="./"
# Update the data view with local paths
taste-update-data-view
# Generate code for OpenGEODE function st02_device_access
cd "$SKELS"/st02_device_access && opengeode --toAda st02_device_access.pr system_structure.pr && cd $OLDPWD
# Generate code for OpenGEODE function st01_routing
cd "$SKELS"/st01_routing && opengeode --toAda st01_routing.pr system_structure.pr && cd $OLDPWD
cd "$SKELS" && rm -f st02_device_access.zip && zip st02_device_access st02_device_access/* && cd $OLDPWD
# Generate code for OpenGEODE function st02_device_access
cd "$SKELS"/st02_device_access && opengeode --toAda st02_device_access.pr system_structure.pr && cd $OLDPWD
cd "$SKELS" && rm -f st01_routing.zip && zip st01_routing st01_routing/* && cd $OLDPWD
cd "$SKELS" && rm -f st02_device_access.zip && zip st02_device_access st02_device_access/* && cd $OLDPWD
[ ! -z "$CLEANUP" ] && rm -rf binary*
if [ -f ConcurrencyView.pro ]
......@@ -98,6 +98,6 @@ cd "$CWD" && assert-builder-ocarina.py \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subAda st02_device_access:"$SKELS"/st02_device_access.zip \
--subAda st01_routing:"$SKELS"/st01_routing.zip \
--subAda st02_device_access:"$SKELS"/st02_device_access.zip \
$ORCHESTRATOR_OPTIONS
No preview for this file type
Datamodel DEFINITIONS ::= BEGIN
-- ./dataview-uniq.asn
TYPE8b_ID ::= INTEGER (0 .. 255)
-- ./dataview-uniq.asn
APID ::= ENUMERATED {
ground(1),
flight(2)
sc_routing(2),
sc_sensorA(3),
sc_sensorB(4),
sc_cpdu(5)
}
-- ./dataview-uniq.asn
APUserID ::= ENUMERATED {
ground_User(1),
sc_routingUser(2),
sc_sensorA_User(3),
sc_sensorB_User(4),
sc_cpdu_User(5)
}
-- ./dataview-uniq.asn
On_off_dev_addr ::= ENUMERATED {
onAddr(61136),
offAddr(61140),
coldResetAddr(61144),
warmResetAddr(61148)
}
-- ./dataview-uniq.asn
TC_2_1 ::= SEQUENCE (SIZE (1 .. 4)) OF On_off_dev_addr
-- ./dataview-uniq.asn
CPDU_output_line_ID ::= INTEGER (0 .. 4095)
-- ./dataview-uniq.asn
CPDU_Ids ::= ENUMERATED {
cpdu_id_1(0),
cpdu_id_2(1)
}
-- ./dataview-uniq.asn
Pulse_Instr_Instance ::= SEQUENCE {
output_line_id CPDU_output_line_ID,
duration_exp_value Pulse_Instr_Instance_duration_exp_value
}
-- ./dataview-uniq.asn
CPDU_Cmd ::= SEQUENCE {
cpdu_id CPDU_Ids OPTIONAL,
cmd_pulse_instr CPDU_Cmd_cmd_pulse_instr
}
-- ./dataview-uniq.asn
TC_2_4 ::= SEQUENCE (SIZE (1 .. 2)) OF CPDU_Cmd
-- ./dataview-uniq.asn
TCs ::= CHOICE {
tc2_1 TC_2_1,
tc2_4 TC_2_4
}
-- ./dataview-uniq.asn
Telecommand ::= SEQUENCE {
dest_apid APID,
sequence_count Telecommand_sequence_count,
packet_length Telecommand_packet_length,
secondary_header Telecommand_secondary_header,
application_data TCs,
packet_error Telecommand_packet_error
}
-- ./dataview-uniq.asn
TM ::= SEQUENCE {
source_apid APID,
sequence_count TM_sequence_count,
packet_length TM_packet_length
}
-- ./dataview-uniq.asn
TM_packet_length ::= INTEGER (0 .. 65535)
-- ./dataview-uniq.asn
TM_sequence_count ::= INTEGER (0 .. 16383)
-- ./dataview-uniq.asn
Telecommand_packet_error ::= INTEGER (0 .. 65535)
-- ./dataview-uniq.asn
Telecommand_secondary_header ::= SEQUENCE {
ack_successful_completion BOOLEAN,
ack_successful_progress BOOLEAN,
ack_successful_start BOOLEAN,
ack_successful_acceptance BOOLEAN,
source_id APUserID
}
-- ./dataview-uniq.asn
Telecommand_packet_length ::= INTEGER (0 .. 65535)
-- ./dataview-uniq.asn
Telecommand_sequence_count ::= INTEGER (0 .. 16383)
-- ./dataview-uniq.asn
CPDU_Cmd_cmd_pulse_instr ::= SEQUENCE (SIZE (1 .. 12)) OF Pulse_Instr_Instance
-- ./dataview-uniq.asn
Pulse_Instr_Instance_duration_exp_value ::= INTEGER (0 .. 7)
-- ./dataview-uniq.asn
Test_TC ::= SEQUENCE {
identifierRequest T_UInt32,
......
This diff is collapsed.
TASTE-Dataview DEFINITIONS ::=
PUS-Implicit-Knowledge DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- taps specific
APID ::= ENUMERATED {
TC-type {APID, APUserID, TCs} ::= SEQUENCE {
dest-apid APID,
sequence-count INTEGER(0..16383),
packet-length INTEGER(0..65535),
secondary-header TC-Secondary-Header {APUserID},
application-data TCs,
packet-error INTEGER(0..65535)
}
TM-type {APID} ::= SEQUENCE {
source-apid APID,
sequence-count INTEGER(0..16383),
packet-length INTEGER(0..65535)
}
TC-Secondary-Header {APUserID} ::= SEQUENCE {
ack-successful-completion BOOLEAN,
ack-successful-progress BOOLEAN,
ack-successful-start BOOLEAN,
ack-successful-acceptance BOOLEAN,
source-id APUserID
}
END
-- Generic definition for TC 2-1 - Distribute on/off device commands from PUS-C
Distribute-On-Off-Device-Commands-Generic DEFINITIONS ::=
BEGIN
On-Off-Device-Command{ On-off-dev-addr, INTEGER: addrsNo} ::= SEQUENCE (SIZE(1..addrsNo)) OF On-off-dev-addr
END
-- Generic definition for TC 2-4 - Distribute CPDU Commands from PUS-C
Distribute-CPDU-Commands-Generic DEFINITIONS ::=
BEGIN
Pulse-Instruction {CPDU-OUTPUT-IDENTIFIER} ::= SEQUENCE {
output-line-id CPDU-OUTPUT-IDENTIFIER,
duration-exp-value INTEGER (0..7)
}
CPDU-Command {CPDU-Identifier, Pulse-Instruction, INTEGER: max-Instr-No} ::= SEQUENCE {
cpdu-id CPDU-Identifier OPTIONAL,
cmd-pulse-instr SEQUENCE (SIZE (1..max-Instr-No)) OF Pulse-Instruction
}
-- TC[2,4] application data
Distribute-CPDU-Commands { CPDU-Cmd, INTEGER:max-Cpdu-Cmds } ::= SEQUENCE (SIZE (1..max-Cpdu-Cmds)) OF CPDU-Cmd
END
Taps DEFINITIONS ::=
BEGIN
IMPORTS Pulse-Instruction,
CPDU-Command,
Distribute-CPDU-Commands
FROM Distribute-CPDU-Commands-Generic
On-Off-Device-Command
FROM Distribute-On-Off-Device-Commands-Generic
TC-type,
TM-type
FROM PUS-Implicit-Knowledge;
-- for acn TC packet secondary header type & subtype
TYPE8b-ID ::= INTEGER (0..255)
APID ::= ENUMERATED { --let ACN manage the "11 bits" constraint
ground(1),
flight(2)
sc-routing(2),
sc-sensorA(3),
sc-sensorB(4),
sc-cpdu(5)
}
APUserID ::= ENUMERATED { --let ACN manage the "16 bits" constraint
ground-User(1),
sc-routingUser(2),
sc-sensorA-User(3),
sc-sensorB-User(4),
sc-cpdu-User(5)
}
-- On-off device addresses , ACN manage the "32 bits" constraint
On-off-dev-addr ::= ENUMERATED {
onAddr(61136),
offAddr(61140),
coldResetAddr(61144),
warmResetAddr(61148)
}
-- Maximum number of On/Off device addresses commands (!bounds constraints not found in PUS-C)
addrsNo INTEGER (1..128) ::= 4
-- Instantiate the TC-2-1
TC-2-1 ::= On-Off-Device-Command{On-off-dev-addr, addrsNo}
---------------------
-- CPDU output Identifier defined in 9.2.1d
CPDU-output-line-ID ::= INTEGER { cpdu-line1(1), cpdu-line2(2)} (0..4095)
CPDU-Ids ::= ENUMERATED { cpdu-id-1, cpdu-id-2 }
Pulse-Instr-Instance ::= Pulse-Instruction { CPDU-output-line-ID }
-- Maximum number of command pulse instructions (project specific) (PUS-C, clause 9.2.1.g)
max-Instr-No INTEGER (12 .. 504) ::= 12
-- Maximum number of CPDU commands (!bounds constraints not found in PUS-C)
max-CPDU-Cmds INTEGER (1..128) ::= 2
CPDU-Cmd ::= CPDU-Command {CPDU-Ids, Pulse-Instr-Instance, max-Instr-No}
(WITH COMPONENTS {..., cpdu-id PRESENT})
-- Instantiate the TC-2-4
TC-2-4 ::= Distribute-CPDU-Commands {CPDU-Cmd, max-CPDU-Cmds}
-- Instantiate the project list of TC
TCs ::= CHOICE {
tc2-1 TC-2-1,
tc2-4 TC-2-4
}
-- Instantiate the generic TC-type
Telecommand ::= TC-type{APID, APUserID, TCs}
-- Instantiate the Telemetry type
TM ::= TM-type{APID}
END
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
Secondary-Header {APID} ::= SEQUENCE {
source-id APID
}
......
......@@ -85,6 +85,39 @@ functions['ground']['interfaces']['testI']['in']['tc_test'] = {
'param_direction': param_in
}
functions['ground']['interfaces']['TC_test'] = {
'port_name': 'TC_test',
'parent_fv': 'ground',
'direction': RI,
'in': {},
'out': {},
'synchronism': asynch,
'rcm': sporadic,
'period': 0,
'wcet_low': 0,
'wcet_low_unit': '',
'wcet_high': 0,
'wcet_high_unit': '',
'distant_fv': 'st01_routing',
'calling_threads': {},
'distant_name': 'TC_test',
'queue_size': 1
}
functions['ground']['interfaces']['TC_test']['paramsInOrdered'] = ['TC']
functions['ground']['interfaces']['TC_test']['paramsOutOrdered'] = []
functions['ground']['interfaces']['TC_test']['in']['TC'] = {
'type': 'Telecommand',
'asn1_module': 'Taps',
'basic_type': sequence,
'asn1_filename': './dataview-uniq.asn',
'encoding': NATIVE,
'interface': 'TC_test',
'param_direction': param_in
}
functions['st01_routing'] = {
'name_with_case' : 'ST01_routing',
'runtime_nature': thread,
......@@ -193,6 +226,39 @@ functions['st01_routing']['interfaces']['test_TM']['in']['testTM'] = {
'param_direction': param_in
}
functions['st01_routing']['interfaces']['TC_test'] = {
'port_name': 'TC_test',
'parent_fv': 'st01_routing',
'direction': PI,
'in': {},
'out': {},
'synchronism': asynch,
'rcm': variator,
'period': 0,
'wcet_low': 0,
'wcet_low_unit': 'ms',
'wcet_high': 0,
'wcet_high_unit': 'ms',
'distant_fv': '',
'calling_threads': {},
'distant_name': '',
'queue_size': 1
}
functions['st01_routing']['interfaces']['TC_test']['paramsInOrdered'] = ['TC']
functions['st01_routing']['interfaces']['TC_test']['paramsOutOrdered'] = []
functions['st01_routing']['interfaces']['TC_test']['in']['TC'] = {
'type': 'Telecommand',
'asn1_module': 'Taps',
'basic_type': sequence,
'asn1_filename': './dataview-uniq.asn',
'encoding': NATIVE,
'interface': 'TC_test',
'param_direction': param_in
}
functions['st02_device_access'] = {
'name_with_case' : 'ST02_device_access',
'runtime_nature': thread,
......
......@@ -6,6 +6,14 @@ use System.IO;
with Ada.Unchecked_Conversion;
with Ada.Numerics.Generic_Elementary_Functions;
with PUS_Implicit_Knowledge;
use PUS_Implicit_Knowledge;
with Distribute_On_Off_Device_Commands_Generic;
use Distribute_On_Off_Device_Commands_Generic;
with Distribute_CPDU_Commands_Generic;
use Distribute_CPDU_Commands_Generic;
with Taps;
use Taps;
with TASTE_Dataview;
use TASTE_Dataview;
with TASTE_BasicTypes;
......@@ -42,6 +50,17 @@ package body st01_routing is
end testI;
procedure TC_test(TC: access asn1SccTelecommand) is
begin
case ctxt.state is
when wait =>
runTransition(CS_Only);
when others =>
runTransition(CS_Only);
end case;
end TC_test;
procedure runTransition(Id: Integer) is
trId : Integer := Id;
begin
......
-- This file was generated automatically: DO NOT MODIFY IT !
with PUS_Implicit_Knowledge;
use PUS_Implicit_Knowledge;
with Distribute_On_Off_Device_Commands_Generic;
use Distribute_On_Off_Device_Commands_Generic;
with Distribute_CPDU_Commands_Generic;
use Distribute_CPDU_Commands_Generic;
with Taps;
use Taps;
with TASTE_Dataview;
use TASTE_Dataview;
with TASTE_BasicTypes;
......@@ -13,6 +21,9 @@ package st01_routing is
-- Provided interface "testI"
procedure testI(tc_test: access asn1SccTest_TC);
pragma Export(C, testI, "st01_routing_testI");
-- Provided interface "TC_test"
procedure TC_test(TC: access asn1SccTelecommand);
pragma Export(C, TC_test, "st01_routing_TC_test");
-- Required interface "testRouting"
procedure RItestRouting(tc_routing: access asn1SccTest_TC);
pragma import(C, RItestRouting, "st01_routing_RI_testRouting");
......
......@@ -11,15 +11,18 @@ SYSTEM st01_routing;
/* CIF Keep Specific Geode PARAMNAMES testTM */
SIGNAL test_TM (Test_TM);
/* CIF Keep Specific Geode PARAMNAMES TC */
SIGNAL TC_test (Telecommand);
CHANNEL c
FROM ENV TO st01_routing WITH testI;
FROM ENV TO st01_routing WITH testI,TC_test;
FROM st01_routing TO ENV WITH testRouting,test_TM;
ENDCHANNEL;
BLOCK st01_routing;
SIGNALROUTE r
FROM ENV TO st01_routing WITH testI;
FROM ENV TO st01_routing WITH testI,TC_test;
FROM st01_routing TO ENV WITH testRouting,test_TM;
CONNECT c and r;
......
No preview for this file type
Datamodel DEFINITIONS ::= BEGIN
-- ./dataview-uniq.asn
TYPE8b_ID ::= INTEGER (0 .. 255)
-- ./dataview-uniq.asn
APID ::= ENUMERATED {
ground(1),
flight(2)
sc_routing(2),
sc_sensorA(3),
sc_sensorB(4),
sc_cpdu(5)
}