Skip to content
Start free evaluation

PdcommSecs1Options

Struct

SECS-I line settings and resource limits for pdcomm_secs1_create().

typedef struct PdcommSecs1Options { ... } PdcommSecs1Options

Declared in: #include <pdcomm_secs1.h>

Every 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_ticks

Declared in: #include <pdcomm_secs1.h>

Bounds 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_ticks

Declared in: #include <pdcomm_secs1.h>

inbound_progress_ticks

Field

T1 inter-character timeout while a block is received, in ticks; nonzero.

uint32_t inbound_progress_ticks

Declared in: #include <pdcomm_secs1.h>

When 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_ticks

Declared in: #include <pdcomm_secs1.h>

On expiry the partially received message is discarded without an event.

max_blocks

Field

Largest number of blocks in an inbound message.

uint16_t max_blocks

Declared in: #include <pdcomm_secs1.h>

Inbound 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_bytes

Declared in: #include <pdcomm_secs1.h>

Inbound 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_bytes

Declared in: #include <pdcomm_secs1.h>

max_events

Field

Largest number of events queued for pdcomm_secs1_next_event(); nonzero.

size_t max_events

Declared in: #include <pdcomm_secs1.h>

max_io_chunk

Field

Largest byte count passed to one read or write callback; nonzero.

size_t max_io_chunk

Declared in: #include <pdcomm_secs1.h>

max_outbound_blocks

Field

Largest number of blocks of a submitted message; nonzero and at most max_blocks.

size_t max_outbound_blocks

Declared in: #include <pdcomm_secs1.h>

max_outbound_body_bytes

Field

Largest body accepted by pdcomm_secs1_submit(); nonzero and at most max_body_bytes.

size_t max_outbound_body_bytes

Declared in: #include <pdcomm_secs1.h>

poll_budget

Field

Number of processing steps in one pdcomm_secs1_poll() call; nonzero.

size_t poll_budget

Declared in: #include <pdcomm_secs1.h>

A 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 priority

Declared in: #include <pdcomm_secs1.h>

reserved

Field

Reserved; must be zero.

uint8_t reserved[3]

Declared in: #include <pdcomm_secs1.h>

reserved2

Field

Reserved; must be zero.

uint16_t reserved2

Declared in: #include <pdcomm_secs1.h>

retry_limit

Field

Retry limit (SEMI E4 RTY) for sending one block.

uint8_t retry_limit

Declared in: #include <pdcomm_secs1.h>

After 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_size

Declared in: #include <pdcomm_secs1.h>

version

Field

Structure version; must be #PDCOMM_SECS1_OPTIONS_VERSION.

uint32_t version

Declared in: #include <pdcomm_secs1.h>