pdcomm_gem_equipment_operator_online
Function
Starts an operator-initiated ON-LINE attempt by sending S1F1.
PdcommStatus pdcomm_gem_equipment_operator_online(PdcommTcpEndpoint *endpoint, PdcommTcpToken *out_token)Allowed only in #PDCOMM_GEM_EQUIPMENT_OFFLINE while the HSMS session is SELECTED. The control state changes to #PDCOMM_GEM_ATTEMPT_ONLINE. When the host answers with S1F2 (an empty List), pdcomm_gem_handle_event() reports #PDCOMM_GEM_ONLINE_ACCEPTED and the control state follows the online mode. A timeout, abort, invalid reply, or disconnect moves the control state to #PDCOMM_GEM_HOST_OFFLINE.
Parameters
| Name | Description |
|---|---|
endpoint | Live TCP endpoint with an equipment role. |
out_token | Receives the transaction token; all zero on failure. Must not be NULL. |
Returns
#PDCOMM_OK when S1F1 was queued; #PDCOMM_INVALID_ARGUMENT when endpoint or out_token is NULL; #PDCOMM_INVALID_STATE when the endpoint has no equipment role, the session is not SELECTED, or the control state is not #PDCOMM_GEM_EQUIPMENT_OFFLINE; #PDCOMM_BACKPRESSURE when a staged TCP event exists, all 32 pending slots are used, or the TCP send queue is full; #PDCOMM_ALLOCATION_FAILED or another TCP status when the message cannot be queued; #PDCOMM_POISONED when the endpoint is poisoned.
Notes
- Results of this request report the request kind #PDCOMM_GEM_OPERATOR_ONLINE.