Esa_Interface_Array_Set()
Abstract
Sets the interface value to an array of data.
Syntax
Esa_Interface_Array_Set (esa_state_ptr, status_ptr, interface, schedule_time, value, start_offset)
| Argument | Type | Description |
|---|---|---|
esa_state_ptr |
EsaT_State_Handle |
ESA state information generated by Esa_Init() |
status_ptr |
int * |
if the return value is EsaC_Comp_Failure, this is set to either ESAC_STATUS_INTERFACE_INVALID or ESAC_STATUS_DIRECTION_INVALID |
interface |
EsaT_Interface |
interface to be set |
schedule_time |
double |
simulation time at which an ESYS interrupt is to be delivered to the process model on the esys module where the interface resides If set to ESAC_NOTIFY_IMMEDIATELY, this causes a forced interrupt of the process model in question.If set to ESAC_NOTIFY_NEVER, the interface value is set, but no notification is delivered to the simulation. |
value |
void * |
start of array of values (type based on the interface) |
start_offset |
int |
starting offset in the array |
Return Type
EsaT_Compcode
EsaC_Comp_Success if data could be delivered; EsaC_Comp_Failure otherwise (with *status_ptr set to an appropriate status value).
Header
esa.h
Details
This function overwrites the interface value with the specified new array. An interrupt is delivered to the process model on the esys module that has the interface in question, unless schedule_time has the special value ESAC_NOTIFY_NEVER.
The interrupt will be a scheduled interrupt if a valid time is provided (assuming the time is greater or equal to the current simulation time) or a forced interrupt if schedule_time is set to ESAC_NOTIFY_IMMEDIATELY.
If the simulation time is currently between the last executed event (T1) and the next scheduled event (T2), call Esa_Current_Event_Time_Set() with a value between T1 and T2 so that calls to op_sim_time() in the model code return a valid value (otherwise op_sim_time() will return T1).