mokomoking2501/profinet_master/ar does not have a README file

    ARBlockReq

    pub(all) struct ARBlockReq {
    ar_type : Int
    ar_uuid :
    Uuid

    session_key : Int
    cm_initiator_mac :
    MacAddress

    cm_initiator_object_uuid :
    Uuid

    ar_properties : Int
    cm_initiator_activity_timeout_factor : Int
    cm_initiator_udp_rt_port : Int
    cm_initiator_station_name : String
    } derive(Eq)

    AR (Application Relationship) block request.

    ARBlockRes

    pub(all) struct ARBlockRes {
    ar_type : Int
    ar_uuid :
    Uuid

    session_key : Int
    cm_responder_mac :
    MacAddress

    cm_responder_udp_rt_port : Int
    } derive(Eq)

    AR block response.

    AlarmCRBlockReq

    pub(all) struct AlarmCRBlockReq {
    alarm_cr_type : Int
    lt : Int
    alarm_cr_properties : Int
    rta_timeout_factor : Int
    rta_retries : Int
    local_alarm_reference : Int
    max_alarm_data_length : Int
    alarm_cr_tag_header_high : Int
    alarm_cr_tag_header_low : Int
    } derive(Eq,
    Debug
    )

    AlarmCRBlockReq — the alarm communication relationship requested in an AR Connect. Field order and defaults mirror the C# reference JIYUAN.PROFINET.IO.Block.AlarmCRBlockReq.

    AlarmCRBlockReq::default

    Default AlarmCR matching the C# reference (LT=0x8892, retries=3, max data length=200, tag headers 0xC000/0xA000).

    ArState

    pub(all) enum ArState {
    Closed
    Init
    Open
    Active
    } derive(Eq,
    Debug
    )

    AR lifecycle states (PN-AL-Services §4.7).

    ConnectResponseSummary

    pub(all) struct ConnectResponseSummary {
    status : Int
    args_length : Int
    block_count : Int
    ar_block : ARBlockRes?
    iocr_blocks : Array[IOCRBlockRes]
    module_diff_blocks : Array[IoBlockView]
    blocks : Array[IoBlockView]
    } derive(Eq)

    DataDescription

    pub(all) struct DataDescription {
    data_description : Int
    data_length : Int
    iocs_length : Int
    iops_length : Int
    } derive(Eq,
    Debug
    )

    One submodule data description: direction, data length, and the IOCS/IOPS status byte lengths (1 each by default).

    ExpectedSlot

    pub(all) struct ExpectedSlot {
    api : Int
    slot_number : Int
    module_ident : Int
    module_properties : Int
    submodules : Array[ExpectedSubmodule]
    } derive(Eq,
    Debug
    )

    Slot entry within an API. api is the C# IoSlotInformation.ID field (the API number) emitted first on the wire.

    ExpectedSubmodule

    pub(all) struct ExpectedSubmodule {
    subslot_number : Int
    submodule_ident : Int
    submodule_properties : Int
    data_descriptions : Array[DataDescription]
    } derive(Eq,
    Debug
    )

    Submodule entry within a slot.

    ExpectedSubmoduleBlockReq

    pub(all) struct ExpectedSubmoduleBlockReq {
    apis : Array[ExpectedSlot]
    } derive(Eq,
    Debug
    )

    ExpectedSubmoduleBlockReq body: a count-prefixed list of slot entries.

    IOCRBlockReq

    pub(all) struct IOCRBlockReq {
    iocr_type : Int
    iocr_reference : Int
    lt : Int
    iocr_properties : Int
    data_length : Int
    frame_id : Int
    send_clock_factor : Int
    reduction_ratio : Int
    phase : Int
    sequence : Int
    frame_send_offset : Int
    watchdog_factor : Int
    data_hold_factor : Int
    iocr_tag_header : Int
    iocr_multicast_mac : Bytes
    apis : Array[IocrApi]
    } derive(Eq,
    Debug
    )

    IOCR (IO Communication Relationship) block request.

    IOCRBlockReq::default_input

    fn IOCRBlockReq::default_input(frame_id : Int) -> IOCRBlockReq

    IOCRBlockReq::default_output

    fn IOCRBlockReq::default_output(frame_id : Int) -> IOCRBlockReq

    IOCRBlockReq::phase_valid

    fn IOCRBlockReq::phase_valid(self : IOCRBlockReq) -> Bool

    IOCRBlockReq::sequence_is_random

    fn IOCRBlockReq::sequence_is_random(self : IOCRBlockReq) -> Bool

    IOCRBlockRes

    pub(all) struct IOCRBlockRes {
    iocr_type : Int
    iocr_reference : Int
    frame_id : Int
    } derive(Eq,
    Debug
    )

    IOCR block response.

    IoBlockView

    pub(all) struct IoBlockView {
    block_type : Int
    block_length : Int
    high_version : Byte
    low_version : Byte
    body : Bytes
    } derive(Eq,
    Debug
    )

    A decoded IO block header plus raw body bytes.

    IoDataObject

    pub(all) struct IoDataObject {
    slot_number : Int
    subslot_number : Int
    frame_offset : Int
    } derive(Eq,
    Debug
    )

    IO data object — references a slot/subslot within an IOCR.

    IoResponseSummary

    pub(all) struct IoResponseSummary {
    status : Int
    args_length : Int
    actual_count : Int
    block_count : Int
    blocks : Array[IoBlockView]
    } derive(Eq)

    IocrApi

    pub(all) struct IocrApi {
    api : Int
    io_data_objects : Array[IoDataObject]
    iocs : Array[IoDataObject]
    } derive(Eq,
    Debug
    )

    API (Application Process Identifier) with its IO data objects.

    ar_type_io_controller

    let ar_type_io_controller : Int

    AR type: IO Controller.

    block_type_alarm_cr_req

    let block_type_alarm_cr_req : Int

    Block type for AlarmCR block request.

    block_type_alarm_cr_res

    let block_type_alarm_cr_res : Int

    Block type for AlarmCR block response.

    block_type_ar_req

    let block_type_ar_req : Int

    Block type for AR block request.

    block_type_ar_res

    let block_type_ar_res : Int

    Block type for AR block response.

    block_type_expected_submodule_req

    let block_type_expected_submodule_req : Int

    Block type for ExpectedSubmodule block request.

    block_type_iocr_req

    let block_type_iocr_req : Int

    Block type for IOCR block request.

    block_type_iocr_res

    let block_type_iocr_res : Int

    Block type for IOCR block response.

    block_type_iox_control_req

    let block_type_iox_control_req : Int

    Block type for IOX Control request (ControlBlockConnect/ApplicationReady).

    block_type_iox_control_res

    let block_type_iox_control_res : Int

    Block type for IOX Control response.

    block_type_module_diff

    let block_type_module_diff : Int

    Block type for ModuleDiffBlock in Connect.rsp.

    ca400_expected_submodule

    fn ca400_expected_submodule() -> ExpectedSubmoduleBlockReq

    ExpectedSubmodule layout for the VTS-EX-CA0400 drive, derived from its GSDML (GSDML-V2.3-V_T-VTS-EX-CA0400):
    • API 0, Slot 1 = Drive (module 0x00000002): Standard telegram 1 (submodule 0x00000002) at subslot 0x0001, INPUT+OUTPUT 10 bytes each (PZD-5/5). Per PN-AL, ExpectedSubmoduleBlockReq contains only submodules referenced by the IOCRs, so the DAP/system submodules are intentionally omitted here. IOCR/frame-offset wiring and exact properties are tuned live in b3.

    ca400_input_iocr

    fn ca400_input_iocr(frame_id? : Int, send_clock_factor? : Int, reduction_ratio? : Int, watchdog_factor? : Int, data_hold_factor? : Int) -> IOCRBlockReq

    Initial CA400 input IOCR mapping for Standard Telegram 1. With the RT Ethernet transport (LT=0x8892, IOCRProperties=2), DataLength uses the RT_CLASS minimum of 40 bytes; telegram data/status occupy the leading bytes.

    ca400_output_iocr

    fn ca400_output_iocr(frame_id? : Int, send_clock_factor? : Int, reduction_ratio? : Int, watchdog_factor? : Int, data_hold_factor? : Int) -> IOCRBlockReq

    Initial CA400 output IOCR mapping for Standard Telegram 1. See ca400_input_iocr for the 40-byte DataLength rationale.

    ca400_tel1_parameter_record_data

    fn ca400_tel1_parameter_record_data() -> Bytes

    CA400 Standard Telegram 1 startup parameter record from the GSDML IDS_TEL1/ParameterRecordDataItem Index=1234 Length=15 Const data.

    data_description_input

    let data_description_input : Int

    DataDescription kinds (submodule direction).

    data_description_output

    let data_description_output : Int

    encode_alarm_cr_block_req

    fn encode_alarm_cr_block_req(req : AlarmCRBlockReq) -> Bytes

    Encode the AlarmCR block body (without the IO block header). 20 bytes, all big-endian.

    encode_application_ready_blocks

    fn encode_application_ready_blocks(ar_uuid :
    Uuid
    , session_key : Int) -> Bytes

    encode_application_ready_response_blocks

    fn encode_application_ready_response_blocks(ar_uuid :
    Uuid
    , session_key : Int) -> Bytes

    encode_ar_block_req

    fn encode_ar_block_req(req : ARBlockReq) -> Bytes

    Encode AR block request body (without block header).

    encode_connect_iod_blocks

    fn encode_connect_iod_blocks(ar : ARBlockReq, input_iocr : IOCRBlockReq, output_iocr : IOCRBlockReq, expected : ExpectedSubmoduleBlockReq, alarm : AlarmCRBlockReq) -> Bytes

    Concatenate the AR Connect IOD blocks (each with its block header) in the canonical Connect.req order.

    encode_connect_request

    fn encode_connect_request(blocks : Bytes, activity_uuid :
    Uuid
    , object_uuid? :
    Uuid
    , sequence_number? : Int) -> Bytes raise
    FrameError

    Assemble a full CL-RPC Connect request UDP payload: DCE/RPC header (opnum 0, PNIO device interface) + NDR args wrapper + IOD blocks.

    encode_control_request

    fn encode_control_request(blocks : Bytes, activity_uuid :
    Uuid
    , object_uuid? :
    Uuid
    , sequence_number? : Int) -> Bytes raise
    FrameError

    encode_control_response

    fn encode_control_response(blocks : Bytes, request_header :
    DceHeader
    ) -> Bytes

    encode_control_response_from_request

    fn encode_control_response_from_request(blocks : Bytes, request : Bytes) -> Bytes raise
    FrameError

    encode_expected_submodule_block_req

    fn encode_expected_submodule_block_req(req : ExpectedSubmoduleBlockReq) -> Bytes

    Encode the ExpectedSubmodule block body (without the IO block header).

    encode_iocr_block_req

    fn encode_iocr_block_req(req : IOCRBlockReq) -> Bytes

    Encode IOCR block request body.

    encode_multiple_write_blocks

    fn encode_multiple_write_blocks(outer_req :
    IODWriteReqHeader
    , embedded_write_blocks : Bytes) -> Bytes

    encode_prm_end_blocks

    fn encode_prm_end_blocks(ar_uuid :
    Uuid
    , session_key : Int) -> Bytes

    encode_read_blocks

    encode_read_request

    fn encode_read_request(blocks : Bytes, activity_uuid :
    Uuid
    , object_uuid? :
    Uuid
    , sequence_number? : Int, opnum? : Int) -> Bytes raise
    FrameError

    encode_release_blocks

    fn encode_release_blocks(ar_uuid :
    Uuid
    , session_key : Int) -> Bytes

    encode_release_request

    fn encode_release_request(blocks : Bytes, activity_uuid :
    Uuid
    , object_uuid? :
    Uuid
    , sequence_number? : Int) -> Bytes raise
    FrameError

    encode_write_blocks

    fn encode_write_blocks(req :
    IODWriteReqHeader
    , record_data : Bytes) -> Bytes

    encode_write_request

    fn encode_write_request(blocks : Bytes, activity_uuid :
    Uuid
    , object_uuid? :
    Uuid
    , sequence_number? : Int) -> Bytes raise
    FrameError

    format_ar_block_req

    fn format_ar_block_req(req : ARBlockReq) -> String

    Format AR block request summary.

    format_connect_response_summary

    fn format_connect_response_summary(summary : ConnectResponseSummary) -> String

    format_io_response_summary

    fn format_io_response_summary(summary : IoResponseSummary) -> String

    format_iocr_block_req

    fn format_iocr_block_req(req : IOCRBlockReq) -> String

    Format IOCR block request summary.

    iocr_phase_valid

    fn iocr_phase_valid(phase : Int, reduction_ratio : Int) -> Bool

    Check the IOCR Phase invariant from PN-AL: 1 <= Phase <= ReductionRatio.

    iocr_sequence_is_random

    fn iocr_sequence_is_random(sequence : Int) -> Bool

    Return true when Sequence uses the mandatory random-sequence mode.

    iocr_sequence_label

    fn iocr_sequence_label(sequence : Int) -> String

    Label the IOCR Sequence mode. Non-zero values are defined optional sequences.

    iocr_type_input

    let iocr_type_input : Int

    IOCR type: Input.

    iocr_type_label

    fn iocr_type_label(iocr_type : Int) -> String

    iocr_type_output

    let iocr_type_output : Int

    IOCR type: Output.

    parse_ar_block_res

    fn parse_ar_block_res(data : Bytes, offset : Int) -> ARBlockRes raise
    FrameError

    Parse AR block response from body bytes.

    parse_io_blocks

    fn parse_io_blocks(data : Bytes, offset : Int) -> Array[IoBlockView] raise
    FrameError

    parse_iocr_block_res

    fn parse_iocr_block_res(data : Bytes, offset : Int) -> IOCRBlockRes raise
    FrameError

    Parse IOCR block response from body bytes.

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io