codemelted.js Module
    Preparing search index...

    Class CProtocol<T>

    Defines the "rules" for objects that will setup a protocol that directly exchanges data with an external item, will continuously run until terminated, requires the ability to know it is running, and get any errors that have occurred during its run.

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index
    • Constructor for the class.

      Type Parameters

      • T

      Parameters

      • params: { name: string; rx_handler: CProtocolEventHandler<T>; type: string }

        The named parameters.

        • name: string

          The name to associate with the protocol for logging purposes.

        • rx_handler: CProtocolEventHandler<T>

          The callback for received data.

        • type: string

          The type of protocol.

      Returns CProtocol<T>

    post_message

    • post_message(data?: any): void

      Posts a given message to the given implementing protocol.

      Parameters

      • Optionaldata: any

        The data to post for the given protocol.

      Returns void

    • Terminates the given protocol.

      Returns void

    • Identifies the type of protocol.

      Returns string