description: >
  Sample EtherNet/IP service commissioning file

metadata:
  name: Sample EtherNet/IP service
  icon: https://www.cybus.io/wp-content/uploads/2017/10/for-whom1.svg
  provider: cybus
  homepage: https://www.cybus.io
  version: 1.0.0

parameters:
  host:
    type: string
    default: 127.0.0.1
  initialReconnectDelay:
    type: integer
    default: 1000
  maxReconnectDelay:
    type: integer
    default: 30000
  factorReconnectDelay:
    type: integer
    default: 2

resources:
  ethernetIpConnection:
    type: Cybus::Connection
    properties:
      protocol: EthernetIp
      connection:
        host: !ref host
        connectionStrategy:
          initialDelay: !ref initialReconnectDelay
          maxDelay: !ref maxReconnectDelay
          incrementFactor: !ref factorReconnectDelay

  sampleSubscription:
    type: Cybus::Endpoint
    properties:
      protocol: EthernetIp
      connection: !ref ethernetIpConnection
      subscribe:
        tagName: dn_count
        programName: SimulationMain

  sampleRead:
    type: Cybus::Endpoint
    properties:
      protocol: EthernetIp
      connection: !ref ethernetIpConnection
      subscribe:
        tagName: dn_count
        programName: SimulationMain

  sampleWrite:
    type: Cybus::Endpoint
    properties:
      protocol: EthernetIp
      connection: !ref ethernetIpConnection
      subscribe:
        tagName: dn_count
        programName: SimulationMain
        tagType: DINT
