Parameter Values (PV)#
- class icspacket.proto.iso_ses.values.PI_Code(*values)[source]#
Common Parameter Identifier (PI) codes. (See X.225, 8.3)
Note
Not all PI codes are mapped to PV implementations here; only those with common, structured bitfield encodings are represented.
Other PIs may be treated as raw byte values in other parts of the parser.
- class icspacket.proto.iso_ses.values.PV_VersionNumber(reserved: int = 0, version2: bool = True, version1: bool = False)[source]#
Version Number PV. (See X.225)
Flags which protocol version(s) this endpoint is willing to run; sent in the CONNECT SPDU and echoed back in the ACCEPT SPDU once the peer has picked one.
- version2: bool = True#
True if Protocol Version 2 is proposed.
- version1: bool = False#
True if Protocol Version 1 is proposed.
- class icspacket.proto.iso_ses.values.PV_TokenSettingPairType(*values)[source]#
The four values a 2-bit token-setting slot can take.
Each slot fixes where one of the session’s tokens starts out:
0 - held by the initiator from the start
1 - held by the responder from the start
2 - left for the SS-user to decide (“user’s choice”)
3 - reserved, not currently assigned a meaning
- class icspacket.proto.iso_ses.values.PV_TokenSetting(release: PV_TokenSettingPairType = PV_TokenSettingPairType.INITIATOR, activity: PV_TokenSettingPairType = PV_TokenSettingPairType.INITIATOR, sync: PV_TokenSettingPairType = PV_TokenSettingPairType.INITIATOR, data: PV_TokenSettingPairType = PV_TokenSettingPairType.INITIATOR)[source]#
Token Setting Item PV. (See X.225)
When present, assigns a starting holder to each of the four session tokens listed below, using the slot values from
PV_TokenSettingPairType.- release: PV_TokenSettingPairType = 0#
Initial position of the release token.
- activity: PV_TokenSettingPairType = 0#
Initial position of the activity token.
- sync: PV_TokenSettingPairType = 0#
Initial position of the synchronization token.
- data: PV_TokenSettingPairType = 0#
Initial position of the data token.
- class icspacket.proto.iso_ses.values.PV_TokenItem(_reserved_1: bool = 0, release_token: bool = False, _reserved_2: bool = 0, activity_token: bool = False, _reserved_3: bool = 0, sync_minor_token: bool = False, _reserved_4: bool = 0, data_token: bool = False)[source]#
Token Item PV. (See X.225)
Each bit is a request flag the called SS-user sets to claim one of the four session tokens listed below.
- release_token: bool = False#
Request for the release token.
- activity_token: bool = False#
Request for the activity token.
- sync_minor_token: bool = False#
Request for the minor sync token.
- data_token: bool = False#
Request for the data token.
- class icspacket.proto.iso_ses.values.PV_TransportDisconnect(_reserved: int = 0, implementation_restriction: bool = False, no_reason: bool = False, protocol_error: bool = False, user_abort: bool = False, release_transport: bool = True)[source]#
Transport Disconnect PV. (See X.225)
Carried in the ABORT SPDU: one bit says whether the transport connection should be released or kept alive, and the rest record which abort reason triggered the message.
- class icspacket.proto.iso_ses.values.PV_SessionRequirements(_reserved: int = 0, data_separation: bool = False, symmetric_sync: bool = False, typed: bool = False, exceptions: bool = False, capability_data_exchange: bool = False, negotiated_release: bool = False, activity_management: bool = False, resync: bool = False, major_sync: bool = False, minor_sync: bool = False, expedited: bool = False, duplex: bool = False, half_duplex: bool = False)[source]#
Session Requirements PV. (See X.225)
Sent by the calling SS-user in the CONNECT SPDU to advertise which optional functional units (listed below) it wants active for the session; the responder echoes back the subset it accepts in the ACCEPT SPDU.
- data_separation: bool = False#
Functional unit: Data separation
- symmetric_sync: bool = False#
Functional unit: Symmetric synchronization
- typed: bool = False#
Functional unit: Typed data
- exceptions: bool = False#
Functional unit: Exceptions
- capability_data_exchange: bool = False#
Functional unit: Capability data exchange
- negotiated_release: bool = False#
Functional unit: Negotiated release
- activity_management: bool = False#
Functional unit: Activity management
- resync: bool = False#
Functional unit: Resynchronization
- major_sync: bool = False#
Functional unit: Major synchronization
- minor_sync: bool = False#
Functional unit: Minor synchronization
- expedited: bool = False#
Functional unit: Expedited data
- duplex: bool = False#
Functional unit: Full-duplex
- half_duplex: bool = False#
Functional unit: Half-duplex
- classmethod default() PV_SessionRequirements[source]#
Return the default client functional-unit proposal.
- update(accepted: PV_SessionRequirements) PV_SessionRequirements[source]#
Return the functional units selected by both peers.
- property is_empty: bool#
Whether no functional units are proposed.
- class icspacket.proto.iso_ses.values.PV_EnclosureItem(_reserved: int = 0, end: bool = False, start: bool = False)[source]#
Enclosure Item PV. (See X.225)
Two independent flags marking whether the carrying SPDU is the start and/or the end of an SSDU.
- end: bool = False#
True if this SPDU is the end of the SSDU.
- start: bool = False#
True if this SPDU is the start of the SSDU.
- class icspacket.proto.iso_ses.values.PV_ProtocolOptions(_reserved: int = 0, extended: bool = False)[source]#
Protocol Options PV. (See X.225, §8.3.19)
Single capability flag sent in the CONNECT SPDU and echoed in the ACCEPT SPDU, advertising support for receiving extended concatenated SPDUs.
- extended: bool = False#
True if extended concatenated SPDUs are supported.
- class icspacket.proto.iso_ses.values.PV_DataOverflow(_reserved: int = 0, overflow: bool = True)[source]#
Data Overflow PV. (See X.225)
- icspacket.proto.iso_ses.values.PV_TYPES = {PI_Code.TOKEN_ITEM: <class 'icspacket.proto.iso_ses.values.PV_TokenItem'>, PI_Code.TRANSPORT_DISCONNECT: <class 'icspacket.proto.iso_ses.values.PV_TransportDisconnect'>, PI_Code.PROTOCOL_OPTIONS: <class 'icspacket.proto.iso_ses.values.PV_ProtocolOptions'>, PI_Code.SESSION_REQUIREMENT: <class 'icspacket.proto.iso_ses.values.PV_SessionRequirements'>, PI_Code.TSDU_MAXIMUM_SIZE: <int32>, PI_Code.VERSION_NUMBER: <class 'icspacket.proto.iso_ses.values.PV_VersionNumber'>, PI_Code.ENCLOSUREITEM: <class 'icspacket.proto.iso_ses.values.PV_EnclosureItem'>, PI_Code.TOKEN_SETTING_ITEM: <class 'icspacket.proto.iso_ses.values.PV_TokenSetting'>, PI_Code.DATA_OVERFLOW: <class 'icspacket.proto.iso_ses.values.PV_DataOverflow'>}#
Mapping from PI codes to their associated Parameter Value types.
This table is used during SPDU parameter decoding to instantiate the right PV object.