Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AIR
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
AIR
Commits
beb82243
Commit
beb82243
authored
Aug 07, 2019
by
Bruno Gomes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://spass-git-ext.gmv.com/AIR/AIR
parents
acd899b0
05ab54d3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
46 deletions
+43
-46
air/examples/gcov5/config.xml
air/examples/gcov5/config.xml
+1
-1
air/examples/periodic/config.xml
air/examples/periodic/config.xml
+1
-1
air/examples/periodic/p0/p0main.c
air/examples/periodic/p0/p0main.c
+0
-3
air/examples/ports/config.xml
air/examples/ports/config.xml
+3
-3
air/examples/ports/recv/recv.c
air/examples/ports/recv/recv.c
+11
-11
air/examples/ports/recv2/recv2.c
air/examples/ports/recv2/recv2.c
+17
-17
air/examples/ports/send/send.c
air/examples/ports/send/send.c
+10
-10
No files found.
air/examples/gcov5/config.xml
View file @
beb82243
...
...
@@ -4,7 +4,7 @@
<!-- Partition 0 -->
<Partition
PartitionIdentifier=
"1"
PartitionName=
"part0"
Criticality=
"LEVEL_A"
EntryPoint=
"entry_point"
SystemPartition=
"false"
>
<PartitionConfiguration
Personality=
"RTEMS
48i
"
Cores=
"1"
Mode=
"source"
>
<PartitionConfiguration
Personality=
"RTEMS
5
"
Cores=
"1"
Mode=
"source"
>
<Libs>
LIBAIR; LIBPRINTF
</Libs>
<Devices></Devices>
<Cache>
CODE; DATA
</Cache>
...
...
air/examples/periodic/config.xml
View file @
beb82243
...
...
@@ -4,7 +4,7 @@
<!-- partition 0-->
<Partition
PartitionIdentifier=
"1"
PartitionName=
"p0"
Criticality=
"LEVEL_A"
SystemPartition=
"true"
EntryPoint=
"producer"
>
<PartitionConfiguration
Personality=
"RTEMS
48I
"
Cores=
"1"
>
<PartitionConfiguration
Personality=
"RTEMS
5
"
Cores=
"1"
>
<Libs>
LIBAIR;IMASPEX;LIBPRINTF
</Libs>
<Cache>
CODE; DATA
</Cache>
<Memory
Size=
"0x500000"
/>
...
...
air/examples/periodic/p0/p0main.c
View file @
beb82243
...
...
@@ -67,7 +67,6 @@ void test2(uintptr_t self_id) {
}*/
}
int
producer
()
{
RETURN_CODE_TYPE
rc
;
...
...
@@ -93,5 +92,3 @@ int producer() {
return
RTEMS_SUCCESSFUL
;
}
air/examples/ports/config.xml
View file @
beb82243
...
...
@@ -8,7 +8,7 @@
Direction=
"SOURCE"
MaxMessageSize=
"1024"
RefreshRateSeconds=
"1.5"
/>
<Queuing_Port
Name=
"QSAMPLE"
Direction=
"SOURCE"
MaxMessageSize=
"1024"
MaxNbMessages=
"32"
/>
<PartitionConfiguration
Personality=
"RTEMS
48I
"
Cores=
"1"
>
<PartitionConfiguration
Personality=
"RTEMS
5
"
Cores=
"1"
>
<Libs>
LIBAIR; IMASPEX; LIBPRINTF
</Libs>
<Devices></Devices>
<Cache>
CODE; DATA
</Cache>
...
...
@@ -24,7 +24,7 @@
Criticality=
"LEVEL_A"
EntryPoint=
"entry_func"
SystemPartition=
"false"
>
<Sampling_Port
Name=
"RECV_SAMP"
Direction=
"DESTINATION"
MaxMessageSize=
"1024"
RefreshRateSeconds=
"1.5"
/>
<PartitionConfiguration
Personality=
"RTEMS
48I
"
Cores=
"1"
>
<PartitionConfiguration
Personality=
"RTEMS
5
"
Cores=
"1"
>
<Libs>
LIBAIR; IMASPEX; LIBPRINTF
</Libs>
<Devices></Devices>
<Cache>
CODE; DATA
</Cache>
...
...
@@ -42,7 +42,7 @@
Direction=
"DESTINATION"
MaxMessageSize=
"1024"
RefreshRateSeconds=
"1.5"
/>
<Queuing_Port
Name=
"QSAMPLE"
Direction=
"DESTINATION"
MaxMessageSize=
"1024"
MaxNbMessages=
"32"
/>
<PartitionConfiguration
Personality=
"RTEMS
48I
"
Cores=
"1"
>
<PartitionConfiguration
Personality=
"RTEMS
5
"
Cores=
"1"
>
<Libs>
LIBAIR; IMASPEX; LIBPRINTF
</Libs>
<Devices></Devices>
<Cache>
CODE; DATA
</Cache>
...
...
air/examples/ports/recv/recv.c
View file @
beb82243
...
...
@@ -16,7 +16,7 @@
#include <imaspex.h>
#ifdef RTEMS48I
#include <p
p
rintf.h>
#include <printf.h>
#endif
...
...
@@ -46,24 +46,24 @@ void test(PARTITION_ID_TYPE self_id) {
while
(
1
)
{
p
p
rintf
(
"Partition %d receiving message..
\n
"
,
self_id
);
printf
(
"Partition %d receiving message..
\n
"
,
self_id
);
/*if (TIME_STAMP > REF_TIME_STAMP), receive from sampling port*/
READ_SAMPLING_MESSAGE_CONDITIONAL
(
RECV_PORT
,
REF_TIME_STAMP
,
(
MESSAGE_ADDR_TYPE
)
message
,
&
SIZE
,
&
TIME_STAMP
,
&
rc
);
if
(
INVALID_PARAM
==
rc
)
{
p
p
rintf
(
"READ_SAMPLING_MESSAGE_CONDITIONAL error %d
\n
"
,
rc
);
printf
(
"READ_SAMPLING_MESSAGE_CONDITIONAL error %d
\n
"
,
rc
);
}
else
if
((
NO_ACTION
==
rc
)
&&
(
0
==
TIME_STAMP
)
&&
(
0
==
SIZE
))
{
p
p
rintf
(
"Empty Sampling Port
\n
"
);
printf
(
"Empty Sampling Port
\n
"
);
}
else
if
((
TIME_STAMP
<=
REF_TIME_STAMP
)
&&
(
NO_ACTION
==
rc
)
&&
(
0
==
SIZE
))
{
p
p
rintf
(
"Timestamp not yet reached
\n
"
);
printf
(
"Timestamp not yet reached
\n
"
);
}
else
if
(
TIME_STAMP
>
REF_TIME_STAMP
)
{
p
p
rintf
(
"Message: %s, timestamp=%ldms
\n
"
,
message
,
(
long
int
)(
TIME_STAMP
/
1000000
)
);
printf
(
"Message: %s, timestamp=%ldms
\n
"
,
message
,
(
long
int
)(
TIME_STAMP
/
1000000
)
);
}
else
{
p
p
rintf
(
"Unexpected READ_SAMPLING_MESSAGE_CONDITIONAL behavior
\n
"
);
printf
(
"Unexpected READ_SAMPLING_MESSAGE_CONDITIONAL behavior
\n
"
);
}
...
...
@@ -90,10 +90,10 @@ int entry_func() {
/*Getting my own ID*/
GET_PARTITION_ID
(
&
self_id
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"GET_PARTITION_ID error %d
\n
"
,
rc
);
printf
(
"GET_PARTITION_ID error %d
\n
"
,
rc
);
}
p
p
rintf
(
"Initializing partition %d...
\n
"
,
self_id
);
printf
(
"Initializing partition %d...
\n
"
,
self_id
);
/*creating Destination sampling Port*/
SAMPLING_PORT_NAME_TYPE
NAME
=
"RECV_SAMP"
;
...
...
@@ -103,7 +103,7 @@ int entry_func() {
CREATE_SAMPLING_PORT
(
NAME
,
SIZE
,
DESTINATION
,
PERIOD
,
&
RECV_PORT
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"CREATE_SAMPLING_PORT error %d
\n
"
,
rc
);
printf
(
"CREATE_SAMPLING_PORT error %d
\n
"
,
rc
);
}
...
...
@@ -114,7 +114,7 @@ int entry_func() {
SET_PARTITION_MODE
(
NORMAL
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"SET_PARTITION_MODE error %d
\n
"
,
rc
);
printf
(
"SET_PARTITION_MODE error %d
\n
"
,
rc
);
}
return
RTEMS_SUCCESSFUL
;
...
...
air/examples/ports/recv2/recv2.c
View file @
beb82243
...
...
@@ -16,7 +16,7 @@
#include <imaspex.h>
#ifdef RTEMS48I
#include <p
p
rintf.h>
#include <printf.h>
#endif
...
...
@@ -59,12 +59,12 @@ void test(uintptr_t self_id) {
while
(
1
)
{
p
p
rintf
(
"Partition %d receiving message..
\n
"
,
self_id
);
printf
(
"Partition %d receiving message..
\n
"
,
self_id
);
GET_SAMPLING_PORT_CURRENT_STATUS
(
RECV_PORT2
,
&
STATUS
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"GET_SAMPLING_PORT_CURRENT_STATUS error %d
\n
"
,
rc
);
printf
(
"GET_SAMPLING_PORT_CURRENT_STATUS error %d
\n
"
,
rc
);
}
switch
(
STATUS
.
UPDATED
)
{
...
...
@@ -72,45 +72,45 @@ void test(uintptr_t self_id) {
case
NEW_MESSAGE
:
READ_UPDATED_SAMPLING_MESSAGE
(
RECV_PORT2
,
(
MESSAGE_ADDR_TYPE
)
message
,
&
SIZE
,
&
UPDATED
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"READ_UPDATED_SAMPLING_MESSAGE error %d
\n
"
,
rc
);
printf
(
"READ_UPDATED_SAMPLING_MESSAGE error %d
\n
"
,
rc
);
}
p
p
rintf
(
"NEW_MSG: %s
\n
"
,
message
);
printf
(
"NEW_MSG: %s
\n
"
,
message
);
break
;
case
CONSUMED_MESSAGE
:
READ_SAMPLING_MESSAGE
(
RECV_PORT2
,
(
MESSAGE_ADDR_TYPE
)
message
,
&
SIZE
,
&
VALIDITY
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"READ_SAMPLING_MESSAGE error %d
\n
"
,
rc
);
printf
(
"READ_SAMPLING_MESSAGE error %d
\n
"
,
rc
);
}
switch
(
VALIDITY
)
{
case
INVALID
:
p
p
rintf
(
"INVALID: %s
\n
"
,
message
);
printf
(
"INVALID: %s
\n
"
,
message
);
break
;
case
VALID
:
p
p
rintf
(
"VALID: %s
\n
"
,
message
);
printf
(
"VALID: %s
\n
"
,
message
);
break
;
}
break
;
case
EMPTY_PORT
:
message
[
0
]
=
'\0'
;
p
p
rintf
(
"Empty sampling port
\n
"
);
printf
(
"Empty sampling port
\n
"
);
break
;
default:
p
p
rintf
(
"Error in STATUS.UPDATED value
\n
"
);
printf
(
"Error in STATUS.UPDATED value
\n
"
);
break
;
}
RECEIVE_QUEUING_MESSAGE
(
qpid
,
INFINITE_TIME_VALUE
,
message
,
&
len
,
&
rc
);
if
(
rc
==
NO_ERROR
)
{
p
p
rintf
(
"Received Partition Queue message %d: %s
\n
"
,
self_id
,
message
);
printf
(
"Received Partition Queue message %d: %s
\n
"
,
self_id
,
message
);
}
else
{
p
p
rintf
(
"Error in Receiving Queue Message - %d
\n
"
,
rc
);
printf
(
"Error in Receiving Queue Message - %d
\n
"
,
rc
);
}
rtems_task_wake_after
(
0
.
6
*
TPS
);
}
...
...
@@ -131,10 +131,10 @@ int entry_func() {
GET_PARTITION_ID
(
&
self_id
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"GET_PARTITION_ID error %d
\n
"
,
rc
);
printf
(
"GET_PARTITION_ID error %d
\n
"
,
rc
);
}
p
p
rintf
(
"Initializing partition %d...
\n
"
,
self_id
);
printf
(
"Initializing partition %d...
\n
"
,
self_id
);
/*creating Destination sampling Port*/
SAMPLING_PORT_NAME_TYPE
NAME
=
"RECV_SAMP2"
;
...
...
@@ -144,12 +144,12 @@ int entry_func() {
CREATE_SAMPLING_PORT
(
NAME
,
SIZE
,
DESTINATION
,
PERIOD
,
&
RECV_PORT2
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"CREATE_SAMPLING_PORT error %d
\n
"
,
rc
);
printf
(
"CREATE_SAMPLING_PORT error %d
\n
"
,
rc
);
}
CREATE_QUEUING_PORT
(
"QSAMPLE"
,
1024
,
32
,
DESTINATION
,
FIFO
,
&
qpid
,
&
rc
);
if
(
NO_ERROR
!=
rc
){
p
p
rintf
(
"CREATE_QUEUING_PORT error %d
\n
"
,
rc
);
printf
(
"CREATE_QUEUING_PORT error %d
\n
"
,
rc
);
}
if
(
RTEMS_SUCCESSFUL
==
rtems_task_create
(
name
,
15
,
4096
,
mode
,
mode_mask
,
&
id
))
{
...
...
@@ -158,7 +158,7 @@ int entry_func() {
SET_PARTITION_MODE
(
NORMAL
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"SET_PARTITION_MODE error %d
\n
"
,
rc
);
printf
(
"SET_PARTITION_MODE error %d
\n
"
,
rc
);
}
return
RTEMS_SUCCESSFUL
;
...
...
air/examples/ports/send/send.c
View file @
beb82243
...
...
@@ -16,7 +16,7 @@
#include <imaspex.h>
#ifdef RTEMS48I
#include <p
p
rintf.h>
#include <printf.h>
#endif
...
...
@@ -40,10 +40,10 @@ void test(uintptr_t self_id) {
RETURN_CODE_TYPE
rc
;
while
(
1
)
{
p
p
rintf
(
"Partition %d sending: %s..
\n
"
,
self_id
,
message
);
printf
(
"Partition %d sending: %s..
\n
"
,
self_id
,
message
);
WRITE_SAMPLING_MESSAGE
(
SEND_PORT
,
(
MESSAGE_ADDR_TYPE
)
message
,
16
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"WRITE_SAMPLING_MESSAGE error %d
\n
"
,
rc
);
printf
(
"WRITE_SAMPLING_MESSAGE error %d
\n
"
,
rc
);
}
/*identify the string with an integer index*/
...
...
@@ -53,10 +53,10 @@ void test(uintptr_t self_id) {
}
message
[
15
]
=
0x30
+
i
;
p
p
rintf
(
"Partition %d sending queuing: %s..
\n
"
,
self_id
,
message
);
printf
(
"Partition %d sending queuing: %s..
\n
"
,
self_id
,
message
);
SEND_QUEUING_MESSAGE
(
qpid
,
(
MESSAGE_ADDR_TYPE
)
message
,
16
,
INFINITE_TIME_VALUE
,
&
rc
);
if
(
rc
!=
NO_ERROR
)
{
p
p
rintf
(
"SEND_QUEUING_MESSAGE error %d
\n
"
,
rc
);
printf
(
"SEND_QUEUING_MESSAGE error %d
\n
"
,
rc
);
}
/*identify the string with an integer index*/
...
...
@@ -88,10 +88,10 @@ int entry_func() {
/*Getting my own partition id*/
GET_PARTITION_ID
(
&
self_id
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"GET_PARTITION_ID error %d
\n
"
,
rc
);
printf
(
"GET_PARTITION_ID error %d
\n
"
,
rc
);
}
p
p
rintf
(
"Initializing partition %d...
\n
"
,
self_id
);
printf
(
"Initializing partition %d...
\n
"
,
self_id
);
/*Creating Source sampling Port*/
...
...
@@ -101,13 +101,13 @@ int entry_func() {
CREATE_SAMPLING_PORT
(
NAME
,
SIZE
,
SOURCE
,
PERIOD
,
&
SEND_PORT
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"CREATE_SAMPLING_PORT error %d
\n
"
,
rc
);
printf
(
"CREATE_SAMPLING_PORT error %d
\n
"
,
rc
);
}
/* Creating Queueing port */
CREATE_QUEUING_PORT
(
"QSAMPLE"
,
1024
,
32
,
SOURCE
,
FIFO
,
&
qpid
,
&
rc
);
if
(
NO_ERROR
!=
rc
){
p
p
rintf
(
"CREATE_QUEUING_PORT error %d
\n
"
,
rc
);
printf
(
"CREATE_QUEUING_PORT error %d
\n
"
,
rc
);
}
...
...
@@ -117,7 +117,7 @@ int entry_func() {
SET_PARTITION_MODE
(
NORMAL
,
&
rc
);
if
(
NO_ERROR
!=
rc
)
{
p
p
rintf
(
"SET_PARTITION_MODE error %d
\n
"
,
rc
);
printf
(
"SET_PARTITION_MODE error %d
\n
"
,
rc
);
}
return
RTEMS_SUCCESSFUL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment