Protocol Utilities

icspacket.proto.mms.util.BasicObjectClassType

Alias for the MMS ObjectClass.basicObjectClass enumeration values.

icspacket.proto.mms.util.DomainSpecificName

Alias for the MMS ObjectName.domain-specific choice type.

icspacket.proto.mms.util.ObjectScope

Alias for the MMS GetNameList-Request.objectScope type.

icspacket.proto.mms.util.VariableAccessItem

Alias for the MMS VariableAccessSpecification.listOfVariable.Member type.

icspacket.proto.mms.util.NamedVariableSpecificationItem

Alias for the MMS VariableAccessSpecification.listOfVariable.Member type.

icspacket.proto.mms.util.DEFAULT_MAX_CALLED = 10

Default value for proposedMaxServOutstandingCalled in an Initiate-Request.

icspacket.proto.mms.util.DEFAULT_MAX_CALLING = 10

Default value for proposedMaxServOutstandingCalling in an Initiate-Request.

icspacket.proto.mms.util.DEFAULT_MAX_DATA_NESTING_DEPTH = 10

Default value for proposedDataStructureNestingLevel in an Initiate-Request.

icspacket.proto.mms.util.new_initiate_request(*, local_detail_calling: int | None = None, max_serv_outstanding_called: int = 10, max_serv_outstanding_calling: int = 10, data_nesting_depth: int | None = 10, version_number: int | None = None, options: ServiceSupportOptions | None = None) Initiate_RequestPDU[source]

Build a new MMS Initiate-RequestPDU.

This utility simplifies construction of the Initiate Service defined in ISO 9506-1, §8.2.

Parameters:
  • local_detail_calling (int | None) – Local detail identifier of the calling MMS-user’s implementation. If not provided, defaults to the global MMS_IMPL_ID.

  • max_serv_outstanding_called (int) – Proposed maximum number of outstanding transactions for the called MMS-user.

  • max_serv_outstanding_calling (int) – Proposed maximum number of outstanding transactions for the calling MMS-user.

  • data_nesting_depth (int | None) – Proposed maximum nesting depth of MMS data elements. If None, indicates unlimited nesting. Must be between 0 and 255.

  • version_number (int | None) – Proposed MMS protocol version number. Defaults to 1 if not specified.

  • options (ServiceSupportOptions | None) – Supported service options of the calling MMS-user. If not provided, defaults to the return value of default_support_options().

Raises:

ValueError – If data_nesting_depth is outside the range [0, 255].

Returns:

A fully constructed MMS Initiate-Request PDU.

Return type:

Initiate_RequestPDU

See also

ISO 9506-1 §8.2, “Initiate Service”

icspacket.proto.mms.util.default_support_options() ServiceSupportOptions[source]

Return a default set of MMS service support options.

This function enables a calling MMS-user to quickly declare support for a representative set of services, without manually toggling each option. The defaults include:

  • Status, Identify, Kill

  • GetNameList, GetVariableAccessAttributes

  • Define/Get/Delete Named Variable List

  • Read, Write

  • Journal services (Read, Write, Initialize, Status report)

  • File services (Open, Close, Read, Delete, Directory)

  • Miscellaneous (InformationReport, Conclude, Cancel, GetCapabilityList)

Returns:

A populated ServiceSupportOptions structure.

Return type:

ServiceSupportOptions

icspacket.proto.mms.util.basic_object_class(class_: basicObjectClass_VALUES, /) ObjectClass[source]

Construct an MMS ObjectClass using a basic object class value.

Parameters:

class (BasicObjectClassType) – Basic object class value (from BasicObjectClassType).

Returns:

A new ObjectClass instance.

Return type:

ObjectClass

icspacket.proto.mms.util.domain_object_name(domain: str, item: str) ObjectName[source]

Construct a domain-specific MMS ObjectName.

Parameters:
  • domain (str) – Domain identifier.

  • item (str) – Item identifier within the domain.

Returns:

A new domain-specific ObjectName.

Return type:

ObjectName

icspacket.proto.mms.util.domain_variable_access(domain: str, name: str) Member_TYPE[source]

Construct a domain-specific MMS variable access specification.

Parameters:
  • domain (str) – Domain identifier containing the variable.

  • name (str) – Name of the variable within the domain.

Returns:

A new variable access item for the given domain object.

Return type:

VariableAccessItem

icspacket.proto.mms.util.vmd_variable_access(name: str) Member_TYPE[source]

Construct an MMS variable access specification for a VMD-specific variable.

Parameters:

name (str) – Name of the VMD-specific variable.

Returns:

A new variable access item for the given VMD object.

Return type:

VariableAccessItem

icspacket.proto.mms.util.object_name_to_string(name: ObjectName) str[source]

Convert an MMS ObjectName to a string representation.

Parameters:

name (ObjectName) – The ObjectName to convert.

Returns:

A string representation of the object name.

Return type:

str