28 #include "FwSmConstants.h"
29 #include "FwSmConfig.h"
31 #include "FwPrConfig.h"
33 #include "FwPrConstants.h"
49 FwSmDesc_t inStream5, outStream5;
50 CrFwPckt_t pcktSend, pcktRec, pcktSend1, pcktRec1, pcktSend2, pcktRec2;
54 if (inStream5 == NULL)
61 if (outStream5 == NULL)
63 FwSmStart(outStream5);
116 if (pcktRec[90] != 99) {
142 if (pcktRec1[90] != 11) {
148 if (pcktRec2[90] != 22) {
189 FwSmDesc_t inStream6, inStream7, outStream6, outStream7;
194 if (inStream6 == NULL)
196 FwSmStart(inStream6);
201 if (inStream7 == NULL)
203 FwSmStart(inStream7);
208 if (outStream6 == NULL)
210 FwSmStart(outStream6);
215 if (outStream7 == NULL)
217 FwSmStart(outStream7);
274 if (pcktRec[90] != 99)
292 if (pcktRec[90] != 11)
315 FwSmDesc_t inStream6, inStream7, outStream6, outStream7;
324 if (inStream6 == NULL)
326 FwSmStart(inStream6);
331 if (inStream7 == NULL)
333 FwSmStart(inStream7);
338 if (outStream6 == NULL)
340 FwSmStart(outStream6);
345 if (outStream7 == NULL)
347 FwSmStart(outStream7);
417 if (pcktRec[90] != 99)
421 if (pcktRec[90] != 98)
425 if (pcktRec[90] != 97)
456 if (pcktRec[90] != 10)
460 if (pcktRec[90] != 11)
464 if (pcktRec[90] != 12)
491 FwSmDesc_t inStream6, inStream7, outStream6, outStream7;
492 CrFwPckt_t sPckt1, sPckt2, sPckt3, cPckt1, cPckt2, cPckt3, pcktRec;
500 if (inStream6 == NULL)
502 FwSmStart(inStream6);
507 if (inStream7 == NULL)
509 FwSmStart(inStream7);
514 if (outStream6 == NULL)
516 FwSmStart(outStream6);
521 if (outStream7 == NULL)
523 FwSmStart(outStream7);
613 if (pcktRec[90] != 99)
617 if (pcktRec[90] != 98)
621 if (pcktRec[90] != 97)
628 if (pcktRec[90] != 10)
632 if (pcktRec[90] != 11)
636 if (pcktRec[90] != 12)
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
void CrFwCmpShutdown(FwSmDesc_t smDesc)
Shutdown a framework component.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
Definition of Base Component.
void CrFwClientSocketSetPort(unsigned short n)
Set the port number for the socket.
void CrFwClientSocketSetHost(char *name)
Set the host name of the server.
void CrFwClientSocketPoll()
Poll the client socket to check whether a new packet has arrived.
Interface for a client socket to be used by InStreams and OutStreams.
Definition of the Framework Component Data (FCD) Type.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
CrFwPckt_t CrFwInStreamGetPckt(FwSmDesc_t smDesc)
Retrieve a packet from the InStream.
CrFwDestSrc_t CrFwInStreamGetSrc(FwSmDesc_t smDesc, CrFwCounterU1_t i)
Get the i-th packet source of the argument InStream.
FwSmDesc_t CrFwInStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InStream State Machine instance.
Definition of the InStream component.
void CrFwInStreamSocketSetHost(char *name)
Set the host name of the server.
void CrFwInStreamSocketPoll(FwSmDesc_t inStream)
Poll the socket to check whether a new packet has arrived.
void CrFwInStreamSocketSetPort(unsigned short n)
Set the port number for the socket.
Interface for the Socket-Based InStream.
Interface for the InStream stub.
Declaration of the test cases for the InStream Component (see CrFwInStream.h).
User-modifiable parameters for the InStream components (see CrFwInStream.h).
CrFwDestSrc_t CrFwOutStreamGetDest(FwSmDesc_t outStream, CrFwCounterU1_t i)
Return the i-th destination associated to the argument outStream.
FwSmDesc_t CrFwOutStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutStream State Machine instance.
void CrFwOutStreamSend(FwSmDesc_t smDesc, CrFwPckt_t pckt)
Send a packet to the OutStream.
void CrFwOutStreamSocketSetPort(unsigned short n)
Set the port number for the socket.
Interface for the Socket-Based OutStream.
Interface for creating and accessing a report or command packet.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination of the command or report encapsulated in a packet.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
void CrFwRepErrStubReset()
Reset the error reporting interface.
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written.
Interface for reporting an error detected by a framework component.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr....
void CrFwServerSocketPoll()
Poll the server socket to check whether a new packet has arrived.
void CrFwServerSocketSetPort(unsigned short n)
Set the port number for the socket.
Interface for a server socket to be used by InStreams and OutStreams.
CrFwBool_t CrFwSocketTestCase2()
Test the initialization and configuration of the client and server sockets of CrFwClientSocket....
CrFwBool_t CrFwSocketTestCase3()
Test the sending and receiving of multiple packets through client and server sockets of CrFwClientSoc...
CrFwBool_t CrFwSocketTestCase4()
Test the interleaved sending and receiving of multiple packets through client and server sockets of C...
CrFwBool_t CrFwSocketTestCase1()
Test the initialization and configuration of the socket-based InStream and OutStream.
Interface through which framework components access the current time.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
@ crNoAppErr
No application errors have been detected.
#define CR_FW_HOST_APP_ID
The identifier of the host application (i.e.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
Definition of the utility functions for the CORDET Framework.