Class SNMPProtocol

All Implemented Interfaces:
org.openremote.model.asset.agent.Protocol<SNMPAgent>

public class SNMPProtocol extends AbstractProtocol<SNMPAgent,SNMPAgentLink>
This is a SNMP client protocol for receiving SNMP traps.

To use this protocol create a SNMPAgent.

  • Field Details

    • PROTOCOL_DISPLAY_NAME

      public static final String PROTOCOL_DISPLAY_NAME
      See Also:
    • LOG

      protected static final Logger LOG
    • oidMap

      protected final Map<String,org.openremote.model.attribute.AttributeRef> oidMap
  • Constructor Details

    • SNMPProtocol

      public SNMPProtocol(SNMPAgent agent)
  • Method Details

    • getProtocolName

      public String getProtocolName()
      Description copied from interface: org.openremote.model.asset.agent.Protocol
      Get the name for this protocol
    • getProtocolInstanceUri

      public String getProtocolInstanceUri()
      Description copied from interface: org.openremote.model.asset.agent.Protocol
      Get a URI that describes this specific protocol instance
    • doStart

      protected void doStart(org.openremote.model.Container container) throws Exception
      Description copied from class: AbstractProtocol
      Start this protocol instance
      Specified by:
      doStart in class AbstractProtocol<SNMPAgent,SNMPAgentLink>
      Throws:
      Exception
    • doStop

      protected void doStop(org.openremote.model.Container container) throws Exception
      Description copied from class: AbstractProtocol
      Stop this protocol instance
      Specified by:
      doStop in class AbstractProtocol<SNMPAgent,SNMPAgentLink>
      Throws:
      Exception
    • doLinkAttribute

      protected void doLinkAttribute(String assetId, org.openremote.model.attribute.Attribute<?> attribute, SNMPAgentLink agentLink) throws RuntimeException
      Description copied from class: AbstractProtocol
      Link an Attribute to its linked Agent.
      Specified by:
      doLinkAttribute in class AbstractProtocol<SNMPAgent,SNMPAgentLink>
      Throws:
      RuntimeException
    • doUnlinkAttribute

      protected void doUnlinkAttribute(String assetId, org.openremote.model.attribute.Attribute<?> attribute, SNMPAgentLink agentLink)
      Description copied from class: AbstractProtocol
      Unlink an Attribute from its linked Agent.
      Specified by:
      doUnlinkAttribute in class AbstractProtocol<SNMPAgent,SNMPAgentLink>
    • doLinkedAttributeWrite

      protected void doLinkedAttributeWrite(SNMPAgentLink agentLink, org.openremote.model.attribute.AttributeEvent event, Object processedValue)
      Description copied from class: AbstractProtocol
      An Attribute event (write) has been requested for an attribute linked to this protocol. The processedValue is the resulting value after applying standard outbound value processing (see ProtocolUtil.doOutboundValueProcessing(org.openremote.model.attribute.AttributeRef, org.openremote.model.asset.agent.AgentLink<?>, java.lang.Object, boolean, java.time.Instant)). Protocol implementations should generally use the processedValue but may also choose to use the original value for some purpose if required.
      Specified by:
      doLinkedAttributeWrite in class AbstractProtocol<SNMPAgent,SNMPAgentLink>