PdcommSecs1Options
Struct
SECS-I line settings and resource limits for pdcomm_secs1_create().
typedef struct PdcommSecs1Options { ... } PdcommSecs1OptionsEvery timer is a nonzero duration in the caller's tick unit (see pdcomm_secs1_poll()). Every limit is application policy; PDComm does not substitute SEMI E4 default values.
Members
ack_wait_ticks
Field
T2 for a reply, in ticks; nonzero.
uint32_t ack_wait_ticksBounds the wait for ACK or NAK after a sent block, and for the length character after the endpoint answers ENQ with EOT. When no length character arrives in time, the endpoint answers NAK.
grant_wait_ticks
Field
T2 for the EOT that grants the line after the endpoint sends ENQ, in ticks; nonzero.
uint32_t grant_wait_ticksinbound_progress_ticks
Field
T1 inter-character timeout while a block is received, in ticks; nonzero.
uint32_t inbound_progress_ticksWhen the line falls silent inside a block, the block is rejected with NAK. After a block with an invalid length or checksum, the endpoint also waits for this much silence before it answers NAK.
inter_block_ticks
Field
T4 inter-block timeout of a multi-block inbound message, in ticks; nonzero.
uint32_t inter_block_ticksOn expiry the partially received message is discarded without an event.
max_blocks
Field
Largest number of blocks in an inbound message.
uint16_t max_blocksInbound blocks that would exceed it are rejected with NAK. It must be at least max_outbound_blocks. Each block carries at most 244 body bytes, and SEMI E4 block numbers end at 32767.
max_body_bytes
Field
Largest inbound message body in bytes.
size_t max_body_bytesInbound blocks that would exceed it are rejected with NAK. It must be at least max_outbound_body_bytes and at most max_event_body_bytes.
max_event_body_bytes
Field
Largest total body bytes held by queued events; at least max_body_bytes.
size_t max_event_body_bytesmax_events
Field
Largest number of events queued for pdcomm_secs1_next_event(); nonzero.
size_t max_eventsmax_io_chunk
Field
Largest byte count passed to one read or write callback; nonzero.
size_t max_io_chunkmax_outbound_blocks
Field
Largest number of blocks of a submitted message; nonzero and at most max_blocks.
size_t max_outbound_blocksmax_outbound_body_bytes
Field
Largest body accepted by pdcomm_secs1_submit(); nonzero and at most max_body_bytes.
size_t max_outbound_body_bytespoll_budget
Field
Number of processing steps in one pdcomm_secs1_poll() call; nonzero.
size_t poll_budgetA step is one callback attempt, one timer expiry, or one internal protocol transition.
priority
Field
Contention role: #PDCOMM_SECS1_MASTER or #PDCOMM_SECS1_SLAVE.
uint32_t priorityreserved
Field
Reserved; must be zero.
uint8_t reserved[3]reserved2
Field
Reserved; must be zero.
uint16_t reserved2retry_limit
Field
Retry limit (SEMI E4 RTY) for sending one block.
uint8_t retry_limitAfter a T2 timeout or a reply other than ACK, the endpoint sends ENQ again until it has retried this many times; then it reports #PDCOMM_SECS1_EVENT_OUTBOUND_FAILED. Zero means a single attempt.
struct_size
Field
Size of this structure in bytes; set to sizeof(PdcommSecs1Options) or larger.
size_t struct_sizeversion
Field
Structure version; must be #PDCOMM_SECS1_OPTIONS_VERSION.
uint32_t version