Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
54bece40
Commit
54bece40
authored
Sep 05, 2016
by
Maxime Perrotin
Browse files
Add demo based on scisys dataview
parent
fa25689f
Changes
4
Hide whitespace changes
Inline
Side-by-side
tests/regression/test-eds1/Makefile
0 → 100644
View file @
54bece40
include
../shared.mk
all
:
test-ada test-llvm
edit
:
$(OPENGEODE)
testsc.pr
test-parse
:
$(OPENGEODE)
testsc.pr
--check
test-ada
:
./check_simu.sh
&&
rm
-rf
testsc_simu
test-c
:
$(OPENGEODE)
testsc.pr
--toC
$(ASN1SCC)
-c
dataview.asn
-typePrefix
asn1Scc
-equal
$(CC)
-O
$(O)
-c
*
.c
test-llvm
:
$(OPENGEODE)
testsc.pr
--llvm
-O
$(O)
$(LLC)
*
.ll
$(CC)
-O
$(O)
-c
*
.s
coverage
:
coverage run
-p
$(OPENGEODE)
testsc.pr
--toAda
.PHONY
:
all edit test-parse test-ada test-llvm coverage
tests/regression/test-eds1/check_simu.sh
0 → 100755
View file @
54bece40
#!/bin/bash -e
rm
-rf
testsc_simu
mkdir
-p
testsc_simu
cp
/home/assert/work/scisys/example/testsc.pr dataview.asn testsc_simu
cd
testsc_simu
opengeode testsc.pr
--shared
cat
dataview.asn
>>
dataview-uniq.asn
asn1.exe
-Ada
-typePrefix
asn1Scc
-equal
dataview.asn
asn1.exe
-c
-typePrefix
asn1Scc
-equal
dataview.asn
gnatmake
-gnat2012
-c
*
.adb
gnatbind
-n
-Llibtestsc
testsc
gnatmake
-c
-gnat2012
b~testsc.adb
gcc
-shared
-fPIC
-o
libtestsc.so b~testsc.o testsc.o ccsdssoissubnetwork.o ccsdssoissubnetworkinterfaces.o demo.o demointerfaces.o environment.o environmentinterfaces.o adaasn1rtl.o
-lgnat
rm
-f
dataview-uniq.c dataview-uniq.h
asn2aadlPlus dataview-uniq.asn DataView.aadl
aadl2glueC DataView.aadl testsc_interface.aadl
asn2dataModel
-toPython
dataview-uniq.asn
make
-f
Makefile.python
echo
"errCodes=
$(
taste-asn1-errCodes ./dataview-uniq.h
)
"
>>
datamodel.py
#LD_LIBRARY_PATH=. opengeode-simulator
tests/regression/test-eds1/dataview.asn
0 → 100644
View file @
54bece40
--
-- Copyright (c) 2015 European Space Agency
-- All Rights Reserved
--
-- Project: SOIS Electronic Data Sheets
--
-- Module: CCSDS_SOIS_Subnetwork.asn
--
-- Author: SOIS EDS Tooling (internal unreleased version)
--
--
CcsdsSoisSubnetwork DEFINITIONS AUTOMATIC TAGS ::= BEGIN
-- imports
-- explicit namespace-level data type declarations
OctetTypeT ::= INTEGER (0..255)
MemoryIDTypeT ::= INTEGER (0..65535)
StartStopT ::= ENUMERATED
{
start(0),
stop(1)
}
MemoryAddressTypeT ::= INTEGER (0..4294967296)
-- explicit component-level data type declarations
END
--
-- Copyright (c) 2015 European Space Agency
-- All Rights Reserved
--
-- Project: SOIS Electronic Data Sheets
--
-- Module: CCSDS_SOIS_Subnetwork_interfaces.asn
--
-- Author: SOIS EDS Tooling (internal unreleased version)
--
--
CcsdsSoisSubnetworkInterfaces DEFINITIONS AUTOMATIC TAGS ::= BEGIN
-- imports
IMPORTS
ExtendedStatusModeEnumTypeT,ExtendedStatusOrModeTypeT,OpCountTypeT,QueryCountTypeT,
ReadStatusModeCommandTypeT,StatusFlag1TypeT,StatusFlag2TypeT,StatusTypeT,TelecommandTypeT,
TelecommandTypeEnumTypeT,TelemetryTypeT,TelemetryTypeEnumTypeT FROM Demo
MemoryAddressTypeT,MemoryIDTypeT FROM CcsdsSoisSubnetwork
;
-- interface messages
-- message types for DemoDeviceDSAPSubnetworkmas
MASInterfaceTypeDownType ::= CHOICE
{
sendCommand CHOICE {
readExtendedstatusormodetype SEQUENCE {
},
readStatustype SEQUENCE {
},
unacknowledgedWrite SEQUENCE {
memoryID MemoryIDTypeT (0..0),
memoryAddress MemoryAddressTypeT (100..100),
data ReadStatusModeCommandTypeT
},
write SEQUENCE {
memoryID MemoryIDTypeT (0..0),
memoryAddress MemoryAddressTypeT (100..100),
data ReadStatusModeCommandTypeT
}
}
}
MASInterfaceTypeUpType ::= CHOICE
{
replyToCommand CHOICE {
readExtendedstatusormodetype SEQUENCE {
data ExtendedStatusOrModeTypeT
},
readStatustype SEQUENCE {
data StatusTypeT
},
write SEQUENCE {
}
}
}
MASInterfaceTypeProviderType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData MASInterfaceTypeDownType,
outputData MASInterfaceTypeUpType
}
MASInterfaceTypeClientType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData MASInterfaceTypeUpType,
outputData MASInterfaceTypeDownType
}
-- message types for DemoDeviceDSAPSubnetworkps
PSInterfaceTypeDownType ::= CHOICE
{
sendCommand CHOICE {
send SEQUENCE {
data TelecommandTypeT
}
}
}
PSInterfaceTypeUpType ::= CHOICE
{
replyToCommand CHOICE {
receive SEQUENCE {
data TelemetryTypeT
}
}
}
PSInterfaceTypeProviderType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData PSInterfaceTypeDownType,
outputData PSInterfaceTypeUpType
}
PSInterfaceTypeClientType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData PSInterfaceTypeUpType,
outputData PSInterfaceTypeDownType
}
END
--
-- Copyright (c) 2015 European Space Agency
-- All Rights Reserved
--
-- Project: SOIS Electronic Data Sheets
--
-- Module: Demo.asn
--
-- Author: SOIS EDS Tooling (internal unreleased version)
--
--
Demo DEFINITIONS AUTOMATIC TAGS ::= BEGIN
-- imports
IMPORTS
OctetTypeT,MemoryAddressTypeT,MemoryIDTypeT FROM CcsdsSoisSubnetwork
;
-- explicit namespace-level data type declarations
StatusFlag1TypeT ::= BOOLEAN
StatusFlag2TypeT ::= BOOLEAN
CalibratedHKTypeT ::= REAL (-3.4028234663852886E+38..3.4028234663852886E+38)
QueryCountTypeT ::= INTEGER (0..255)
ExtendedModeTypeT ::= INTEGER (0..255)
ExtendedStatusTypeT ::= INTEGER (0..255)
HKTypeT ::= INTEGER (0..255)
CommandStatusTypeT ::= INTEGER (0..65535)
EventDataTypeT ::= INTEGER (0..255)
UserDataLengthTypeT ::= INTEGER (0..65535)
ModeTypeT ::= ENUMERATED
{
reset(0),
doALittleBitOfStuff(1),
doLotsOfStuff(4),
doTonnesOfStuffBadly(6),
revealABugAndMalfunction(9)
}
EventTypeTypeT ::= ENUMERATED
{
event1(0),
event2(1),
event3(2)
}
ReadStatusModeCommandTypeT ::= ENUMERATED
{
readStatus(1),
readMode(2)
}
ExtendedStatusModeEnumTypeT ::= ENUMERATED
{
mode(0),
status(1)
}
TelecommandTypeEnumTypeT ::= ENUMERATED
{
mode(0),
userData(1)
}
TelemetryTypeEnumTypeT ::= ENUMERATED
{
ack(0),
type1(1),
type2(2),
event(3)
}
OpCountTypeT ::= INTEGER (0..39)
StatusTypeT ::=
SEQUENCE
{
statusFlag1 StatusFlag1TypeT,
statusFlag2 StatusFlag2TypeT,
opCount OpCountTypeT
}
TelemetrySet1TypeT ::=
SEQUENCE
{
hk1 HKTypeT,
hk2 HKTypeT
}
TelemetrySet2TypeT ::=
SEQUENCE
{
hk3 HKTypeT,
hk4 HKTypeT
}
EventTypeT ::=
SEQUENCE
{
typeKeyword EventTypeTypeT,
data EventDataTypeT
}
ExtendedStatusOrModeTypeT ::=
SEQUENCE
{
queryCount QueryCountTypeT,
body-choice CHOICE {
mode ExtendedModeUnionTypeBodyT,
status ExtendedStatusUnionTypeBodyT
}
}
ExtendedModeUnionTypeBodyT ::= SEQUENCE
{
mode ExtendedModeTypeT
}
ExtendedStatusUnionTypeBodyT ::= SEQUENCE
{
status ExtendedStatusTypeT
}
ExtendedStatusUnionTypeT ::=
SEQUENCE
{
queryCount QueryCountTypeT,
typeKeyword ExtendedStatusModeEnumTypeT,
status ExtendedStatusTypeT
}
ExtendedModeUnionTypeT ::=
SEQUENCE
{
queryCount QueryCountTypeT,
typeKeyword ExtendedStatusModeEnumTypeT,
mode ExtendedModeTypeT
}
TelecommandTypeT ::=
SEQUENCE
{
body-choice CHOICE {
mode TelecommandModeTypeBodyT,
userData TelecommandUserDataTypeBodyT
}
}
TelecommandModeTypeBodyT ::= SEQUENCE
{
mode ModeTypeT
}
TelecommandUserDataTypeBodyT ::= SEQUENCE
{
userData SEQUENCE SIZE(0..255) OF OctetTypeT
}
TelecommandModeTypeT ::=
SEQUENCE
{
typeKeyword TelecommandTypeEnumTypeT,
mode ModeTypeT
}
TelecommandUserDataTypeT ::=
SEQUENCE
{
typeKeyword TelecommandTypeEnumTypeT,
userData SEQUENCE SIZE(0..255) OF OctetTypeT
}
TelemetryTypeT ::=
SEQUENCE
{
body-choice CHOICE {
ack TelemetryAckTypeBodyT,
type1 Telemetry1TypeBodyT,
type2 Telemetry2TypeBodyT,
event TelemetryEventTypeBodyT
}
}
Telemetry1TypeBodyT ::= SEQUENCE
{
telemetrySet TelemetrySet1TypeT
}
Telemetry2TypeBodyT ::= SEQUENCE
{
telemetrySet TelemetrySet2TypeT
}
TelemetryAckTypeBodyT ::= SEQUENCE
{
status CommandStatusTypeT
}
TelemetryEventTypeBodyT ::= SEQUENCE
{
eventType EventTypeTypeT,
eventData EventDataTypeT
}
TelemetryAckTypeT ::=
SEQUENCE
{
typeKeyword TelemetryTypeEnumTypeT,
status CommandStatusTypeT
}
Telemetry1TypeT ::=
SEQUENCE
{
typeKeyword TelemetryTypeEnumTypeT,
telemetrySet TelemetrySet1TypeT
}
Telemetry2TypeT ::=
SEQUENCE
{
typeKeyword TelemetryTypeEnumTypeT,
telemetrySet TelemetrySet2TypeT
}
TelemetryEventTypeT ::=
SEQUENCE
{
typeKeyword TelemetryTypeEnumTypeT,
eventType EventTypeTypeT,
eventData EventDataTypeT
}
-- explicit component-level data type declarations
-- types local to DemoDeviceDACP
-- types local to DemoDeviceDSAP
END
--
-- Copyright (c) 2015 European Space Agency
-- All Rights Reserved
--
-- Project: SOIS Electronic Data Sheets
--
-- Module: Demo_interfaces.asn
--
-- Author: SOIS EDS Tooling (internal unreleased version)
--
--
DemoInterfaces DEFINITIONS AUTOMATIC TAGS ::= BEGIN
-- imports
IMPORTS
CommandStatusTypeT,EventDataTypeT,EventTypeT,EventTypeTypeT,ExtendedModeTypeT,
ExtendedStatusTypeT,HKTypeT,ModeTypeT,OpCountTypeT,QueryCountTypeT,StatusFlag1TypeT,
StatusFlag2TypeT,StatusTypeT,TelemetrySet1TypeT,TelemetrySet2TypeT,CalibratedHKTypeT FROM Demo
OctetTypeT FROM CcsdsSoisSubnetwork
;
-- interface messages
-- message types for DeviceInterface
DeviceAccessInterfaceDownType ::= CHOICE
{
getParameter CHOICE {
extendedMode INTEGER(0),
extendedStatus INTEGER(0),
queryCount INTEGER(0),
status INTEGER(0)
},
sendCommand CHOICE {
setMode SEQUENCE {
mode ModeTypeT
},
setUserData SEQUENCE {
data OctetTypeT
}
}
}
DeviceAccessInterfaceUpType ::= CHOICE
{
updateParameter CHOICE {
deviceEvent EventTypeT,
extendedMode ExtendedModeTypeT,
extendedStatus ExtendedStatusTypeT,
queryCount QueryCountTypeT,
status StatusTypeT,
telemetrySet1 TelemetrySet1TypeT,
telemetrySet2 TelemetrySet2TypeT
},
replyToCommand CHOICE {
setMode SEQUENCE {
status CommandStatusTypeT
},
setUserData SEQUENCE {
status CommandStatusTypeT
}
}
}
DeviceAccessInterfaceProviderType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData DeviceAccessInterfaceDownType,
outputData DeviceAccessInterfaceUpType
}
DeviceAccessInterfaceClientType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData DeviceAccessInterfaceUpType,
outputData DeviceAccessInterfaceDownType
}
-- message types for DemoDeviceDACPVirtualinterface
DeviceFunctionalInterfaceUpType ::= CHOICE
{
updateParameter CHOICE {
hk1 CalibratedHKTypeT,
hk2 CalibratedHKTypeT
}
}
DeviceFunctionalInterfaceProviderType ::= SEQUENCE
{
outputData DeviceFunctionalInterfaceUpType
}
DeviceFunctionalInterfaceClientType ::= SEQUENCE
{
inputReady BOOLEAN,
inputData DeviceFunctionalInterfaceUpType
}
END
--
-- Copyright (c) 2015 European Space Agency
-- All Rights Reserved
--
-- Project: SOIS Electronic Data Sheets
--
-- Module: Environment.asn
--
-- Author: SOIS EDS Tooling (internal unreleased version)
--
--
Environment DEFINITIONS AUTOMATIC TAGS ::= BEGIN
-- imports
T-N1 ::= BOOLEAN
-- explicit namespace-level data type declarations
-- explicit component-level data type declarations
-- types local to Application
END
--
-- Copyright (c) 2015 European Space Agency
-- All Rights Reserved
--
-- Project: SOIS Electronic Data Sheets
--
-- Module: Environment_interfaces.asn
--