Interface Connectable

  • All Known Implementing Classes:
    Assembly, Assembly.DynamicData, ConnectableAttr, LgxTag

    public interface Connectable
    I/O assemblies and any other application object that is capable of participating in an I/O connection of any kind must implement either the connect method or the sub/unsub methods, or all of them.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void config​(SimpleDataSeg dataseg)
      Configuration assemblies or any other object that can be targeted for configuration data in a forward open service must implement this method.
      AppConsumer connect​(AppOwner owner, ConxClass.CxParams params, byte dirtrigcls)
      This method requests that the given connection be assigned as the owner of this object and an appropriate AppConsumer shim be created to handle the incoming data.
      void disconnect()
      This method forces any owner's shim to shutdown (breaking a connection if applicable), and if there was an owner, shuts down subscribers too.
      void disconnectSubscribers()
      This method disconnects all subscribers, a requirement during shutdown.
      AppOwner getOwner()
      Obtain the current owner's shim if owned, or null.
      int payloadBytes()
      Report number of payload bytes expected, other than the mode & CIP short sequence.
      void subscribe​(AppProducer sub, ConxClass.CxParams params, byte dirtrigcls)
      This method requests that the given connection be added to the list of subscribers to new data production from this object.
      void txFresh()
      This method notifies a producer that a data has been updated and a new sequence number should be generated.
      void txTrigger()
      This method notifies a producer that a transmission trigger has expired and new data would be appropriate if it can be assembled and delivered synchronously in this call.
      void unsubscribe​(AppProducer sub)
      This method drops the given connection from the list of new data subscribers.
    • Method Detail

      • connect

        AppConsumer connect​(AppOwner owner,
                            ConxClass.CxParams params,
                            byte dirtrigcls)
        This method requests that the given connection be assigned as the owner of this object and an appropriate AppConsumer shim be created to handle the incoming data. Application Consumer objects handle data flow from connections to application objects. The provided AppOwner instance includes appropriate buffer handling, including removal/use of CIP short sequence numbers and originator idle/run mode indicators. This class's shutdown() method is used to disconnect.
        Parameters:
        owner -
        params -
        dirtrigcls - Direction/Trigger/Class combination to use.
        Returns:
      • payloadBytes

        int payloadBytes()
        Report number of payload bytes expected, other than the mode & CIP short sequence.
        Returns:
      • disconnect

        void disconnect()
        This method forces any owner's shim to shutdown (breaking a connection if applicable), and if there was an owner, shuts down subscribers too.
      • disconnectSubscribers

        void disconnectSubscribers()
        This method disconnects all subscribers, a requirement during shutdown.
      • getOwner

        AppOwner getOwner()
        Obtain the current owner's shim if owned, or null.
        Returns:
      • config

        void config​(SimpleDataSeg dataseg)
        Configuration assemblies or any other object that can be targeted for configuration data in a forward open service must implement this method.
        Parameters:
        dataseg -
      • subscribe

        void subscribe​(AppProducer sub,
                       ConxClass.CxParams params,
                       byte dirtrigcls)
        This method requests that the given connection be added to the list of subscribers to new data production from this object. Repeat subscriptions are ignored.
        Parameters:
        sub -
        params -
        dirtrigcls - Direction/Trigger/Class combination to use.
      • unsubscribe

        void unsubscribe​(AppProducer sub)
        This method drops the given connection from the list of new data subscribers.
        Parameters:
        sub -
      • txTrigger

        void txTrigger()
        This method notifies a producer that a transmission trigger has expired and new data would be appropriate if it can be assembled and delivered synchronously in this call.
      • txFresh

        void txFresh()
        This method notifies a producer that a data has been updated and a new sequence number should be generated. Produces to subscribers with application or change of state trigger types.