pdcomm_gem_host_remote_command
Function
Sends S2F41 Host Command Send (W=1) from a Host.
PdcommStatus pdcomm_gem_host_remote_command(PdcommTcpEndpoint *endpoint, const PdcommSecsItem *name, const PdcommGemCommandParameter *parameters, size_t count, PdcommTcpToken *out_token)The request uses one of the 32 native GEM pending slots. The name and parameter items are copied into a bounded wire snapshot before the call returns, so the caller keeps ownership of them. Success means the request was queued, not that the command ran: pdcomm_gem_handle_event() later yields a RESPONSE result with outcome #PDCOMM_GEM_COMMAND_ACK and the received CPACK entries. The CPACK names are not matched against the request names.
Parameters
| Name | Description |
|---|---|
endpoint | Endpoint with a configured GEM Host. |
name | RCMD item: nonempty ASCII or an integer scalar from -128 to 255. |
parameters | Array of count CPNAME/CPVAL pairs. May be NULL when count is 0. |
count | Number of parameters; must be less than the Host item_count limit. |
out_token | Receives the transaction token; zero after every failure. |
Returns
#PDCOMM_OK when the request was queued (queue acceptance only); #PDCOMM_INVALID_ARGUMENT when endpoint, name, or out_token is NULL, parameters is NULL with a nonzero count, a pair contains a NULL item, or a name is not a valid RCMD or CPNAME; #PDCOMM_LIMIT_EXCEEDED when the message would exceed the Host item limits; #PDCOMM_INVALID_STATE when the endpoint has no GEM Host, communication is not COMMUNICATING, or the HSMS session is not selected; #PDCOMM_BACKPRESSURE when a TCP event is staged, all 32 pending slots are busy, or the TCP queue is full or stopping; #PDCOMM_ALLOCATION_FAILED; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained; or another TCP submission status, as for pdcomm_tcp_request().