• No results found

8.5 IOC

8.5.1 Imported types

8.5.4.2 IocSend /IocWrite

The IocWrite API call is generated for "data" (unqueued) semantics and the Ioc-SendAPI call is generated for "event" (queued) semantics.

[SWS_Os_00718] d

Service Name IocSend_<IocId>[_<SenderId>]

Reentrancy This function is generated individually for each sender. The individual function is not reentrant (if called from different runnable entities that belong to the same sender), but different functions can be called in parallel.

IN Data value to be sent over a communication identified by the <Ioc Id>. The parameter will be passed by value for primitive data elements and by reference for all other types.

Example: Std_ReturnType IocSend_RTE_25 (const uint32 UI_

Value); Std_ReturnType IocSend_RTE_42 (const TASKParams3

*pStr_Value);

Parameters (in)

numberOfBytesIN (optional) number of bytes to be send Parameters (inout) None

Parameters (out) None

Return value Std_ReturnType IOC_E_OK: The data has been passed successfully to the communication service.

IOC_E_LIMIT: IOC internal communication buffer is full (Case:

Receiver is slower than sender). This error produces an IOC_E_

LOST_DATA Overlayed Error on the receiver side at the next data reception.

IOC_E_LENGTH: The <numberOfBytesIN> exceeds either the internal buffer or is equal zero, so no data is send.

Description Performs an "explicit" sender-receiver transmission of data elements with "event" semantic for a unidirectional 1:1 or N:1 communication between OS-Applications located on the same or on different cores.

<IocId> is a unique identifier that references a unidirectional 1:1 or N:1 communication.

<SenderId> is used only in N:1 communication. Together with <IocId>, it uniquely identifies the sender. It is separated from <IocId> with an underscore. In case of 1:1 communication, it shall be omitted.

Reentrancy This function is generated individually for each sender. The individual function is not reentrant (if called from different runnable entities that belong to the same sender), but different functions can be called in parallel.

5

4

IN Data value to be sent over a communication identified by the <Ioc Id>. The parameter will be passed by value for primitive data elements and by reference for all other types.

Example: Std_ReturnType IocWrite_RTE_25 (const uint32 UI_

Value); Std_ReturnType IocWrite_RTE_42 (const TASKParams3

*pStr_Value);

Parameters (in)

numberOfBytesIN (optional) number of bytes to be send Parameters (inout) None

Parameters (out) None

Return value Std_ReturnType IOC_E_OK: The data has been passed successfully to the communication service.

IOC_E_LENGTH: The <numberOfBytesIN> exceeds either the internal buffer or is equal zero, so no data is send.

Description Performs an "explicit" sender-receiver transmission of data elements with "data" semantic for a unidirectional 1:1 or N:1 communication between OS-Applications located on the same or on different cores.

<IocId> is a unique identifier that references a unidirectional 1:1 or N:1 communication.

<SenderId> is used only in N:1 communication. Together with <IocId>, it uniquely identifies the sender. It is separated from <IocId> with an underscore. In case of 1:1 communication, it shall be omitted.

<numberOfBytesIN> specifies the size of the data to be transmitted (in bytes).

Available via Ioc.h

c()

General:

[SWS_Os_00719] dIocSend/IocWriteis asynchronous in that way it shall not have to wait for the reception of the data on the receiving side to return from execution.c (SRS_Os_80020)

[SWS_Os_00720] dThe IocSend/IocWrite function shall not return until the data given in parameter have been completely physically sent over the communication medium.

For example in case of communication over shared RAM, anIocSend/IocWriteshall return when all data have been copied in the target shared RAM.c(SRS_Os_80020) [SWS_Os_00721] dIn case of "event" (queued) semantic, the IocSend function shall guarantee the order of delivery. In case of senders from different cores, the order in which messages are received will be determined by the implementation.c(SRS_Os_-80020)

[SWS_Os_00722] dThe IocSend/IocWrite function shall support mechanism to guarantee data-Integrity during transmission.

TheIocSend/IocWritefunction shall solve the crossing of the protection boundaries of OS-Applications. It has to be generated in case of intra-core and inter-core commu-nication.c(SRS_Os_80020)

[SWS_Os_00820] dTheIocSend/IocWritefunction shall be wrapped with the

mem-1 #define OS_<IE>_START_SEC_CODE

2 #include "Os_MemMap.h"

3

4 <IocSend, IocWrite>

5

6 #define OS_<IE>_STOP_SEC_CODE

7 #include "Os_MemMap.h"

where <IE> is the shortName of the sending OsApplication configured in OsIoc-SendingOsApplicationRef of the respectiveOsIocCommunicationchannel.c() Parameters:

[SWS_Os_00723] dThe IN <Data> parameter of the IocSend/IocWrite function shall be passed

by value for primitive data types, as an pointer to the array base type for arrays and by reference for all other types.c(SRS_Os_80020)

[SWS_Os_00724] dFor data passed as an pointer to the array base type or by refer-ence, theIocSend/IocWritefunction shall guarantee upon return that the parameter is safe for re-use.c(SRS_Os_80020)

Returned values:

[SWS_Os_00725] dThe IocSend/IocWrite function shall return IOC_E_OK if the data was passed successfully to the communication service.c(SRS_Os_80020)

[SWS_Os_00726] dIn case of "event" semantic the IocSend function shall return IOC_E_LIMIT if an IOC internal transmission buffer became full (Case: Receiver is slower than sender or/and configured internal IOC buffer size is too small).

If this error occurs the IOC internal buffer could not be filled with the parameter. In that case this error shall produce an IOC_E_LOST_DATAOverlayed Error on the receiver side at the next data reception (s. SWS_Os_00745).c(SRS_Os_80020)

Internal structures:

[SWS_Os_00727] dIn case of "event" semantic the IOC shall configure its internal transmission buffer size with the value of the attribute OsIocBufferLength.c(SRS_-Os_80020)