CORDET Framework - C2 Implementation
|
Main program for the Slave 1 Application of the CORDET Demo. More...
Go to the source code of this file.
Functions | |
int | main () |
Main program for the Slave 1 Application. More... | |
Main program for the Slave 1 Application of the CORDET Demo.
The CORDET Demo consists of three applications: the Master Application, the Slave 1 Application and the Slave 2 Application. The two slave applications are responsible for monitoring a temperature sensor. If they find a limit violation, they send a report to the Master Application. The Master Application is responsible for enabling and disabling the monitoring in the slave applications and for setting the monitoring limits.
The CORDET Demo supports one single service: the "Temperature Monitoring Service". The type identifier of the Temperature Monitoring Service is equal to: 64. This service is implemented by the following commands and reports:
The logical links among the three applications are as follows:
Note that there is no logical link between the two slaves which are completely independent of each other (see first figure below).
The physical links among the three applications are as follows (see second figure below):
Thus, messages between the Master Application and Slave 2 are routed through Slave 1 (the routing is done by the CORDET Framework).
The Master Application generates the commands to and receives the reports from the Slave Applications.
This file is part of the CORDET Framework.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file CrS1Main.c.
int main | ( | ) |
Main program for the Slave 1 Application.
This Main Program performs the following actions:
CrFwAuxConfigCheck
.In all control cycles, the server socket waiting for commands from the Master Application or reports from the Slave 2 Application is polled through a call to CrDaServerSocketPoll
.
In principle, in all control cycles, the temperature to be monitored should be acquired from some external device. In this example, instead, the temperature is set to a "low" value in all cycles except those which are multiples of 10 when it is set to a "high" value.
Definition at line 117 of file CrS1Main.c.