edgexfoundry/device-snmp-go

Profile needs to be update fore Patlite (and probably other) devices

Closed this issue · 0 comments

change patlite profile example to be this (YAML)
name: "patlite"
manufacturer: "Patlite Corp"
model: "NHL-FB2"
labels:

  • "patlite"

  • "signal tower"
    description: "Patlite Signal Tower accessed via SNMP"
    deviceResources:

  • name: RedLightControlState
    description: "Red light state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.2.1", community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: AmberLightControlState
    description: "Amber light state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.2.2" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: GreenLightControlState
    description: "Green light state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.2.3" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: BuzzerControlState
    description: "Buzzer state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.2.6" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: RedLightTimer
    description: "Red light timer."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.3.1" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: AmberLightTimer
    description: "Amber light timer."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.3.2" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: GreenLightTimer
    description: "Green light timer."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.3.3" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: BuzzerTimer
    description: "Green light timer."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.3.6" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: RedLightCurrentState
    description: "Red light current state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.4.1" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: AmberLightCurrentState
    description: "Amber light current state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.4.2" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: GreenLightCurrentState
    description: "Green light current state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.4.3" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

  • name: BuzzerCurrentState
    description: "Buzzer current state."
    attributes:
    { oid: "1.3.6.1.4.1.20440.4.1.5.1.2.1.4.6" , community: "private" }
    properties:
    value:
    { type: "INT32", size: "4", readWrite: "RW", minimum: "1", maximum: "5", defaultValue: "1"}
    units:
    { type: "String", readWrite: "R", defaultValue: "Enabled/Disabled"}

deviceCommands:

name: RedLight
get:
  - { operation: "get", deviceResource: "RedLightCurrentState", parameter: "RedLightControlState", property: "value" }

set:
  - { index: "1", operation: "set", deviceResource: "RedLightControlState", property: "value", parameter: "RedLightControlState" }
  - { index: "2", operation: "set", deviceResource: "RedLightTimer", property: "value", parameter: "RedLightTimer"}
  • name: GreenLight
    get:

    • { operation: "get", deviceResource: "GreenLightCurrentState", parameter: "GreenLightControlState", property: "value" }

    set:

    • { index: "1", operation: "set", deviceResource: "GreenLightControlState", property: "value", parameter: "GreenLightControlState" }
    • { index: "2", operation: "set", deviceResource: "GreenLightTimer", property: "value", parameter: "GreenLightTimer"}
  • name: AmberLight
    get:

    • { operation: "get", deviceResource: "AmberLightCurrentState", parameter: "AmberLightControlState", property: "value" }

    set:

    • { index: "1", operation: "set", deviceResource: "AmberLightControlState", property: "value", parameter: "AmberLightControlState" }
    • { index: "2", operation: "set", deviceResource: "AmberLightTimer", property: "value", parameter: "AmberLightTimer"}
  • name: Buzzer
    get:

    • { operation: "get", deviceResource: "BuzzerCurrentState", parameter: "BuzzerControlState", property: "value" }

    set:

    • { index: "1", operation: "set", deviceResource: "BuzzerControlState", property: "value", parameter: "BuzzerControlState" }
    • { index: "2", operation: "set", deviceResource: "BuzzerTimer", property: "value", parameter: "BuzzerTimer"}
  • name: AllLights
    get:

    • { index: "1", operation: "get", deviceResource: "RedLightCurrentState", parameter: "RedLightControlState", property: "value" }
    • { index: "2", operation: "get", deviceResource: "GreenLightCurrentState", parameter: "GreenLightControlState", property: "value" }
    • { index: "3", operation: "get", deviceResource: "AmberLightCurrentState", parameter: "AmberLightControlState", property: "value" }
    • { index: "4", operation: "get", deviceResource: "BuzzerCurrentState", parameter: "BuzzerControlState", property: "value" }

coreCommands:

name: AllLights
get:
  path: "/api/v1/device/{deviceId}/AllLights"
  responses:
    -
      code: "200"
      description: "Get all light States."
      expectedValues: ["RedLightControlState, GreenLightControlState, AmberLightControlState, BuzzerControlState"]
    -
      code: "503"
      description: "service unavailable"
      expectedValues: []
  • name: RedLight
    get:
    path: "/api/v1/device/{deviceId}/RedLight"
    responses:
    -
    code: "200"
    description: "Get the red light State."
    expectedValues: ["RedLightControlState"]
    -
    code: "503"
    description: "service unavailable"
    expectedValues: []

    put:
    path: "/api/v1/device/{deviceId}/RedLight"
    parameterNames: ["RedLightControlState", "RedLightTimer"]
    responses:
    -
    code: "204"
    description: "Set the red light."
    expectedValues: []
    -
    code: "503"
    description: "service unavailable"
    expectedValues: []

  • name: GreenLight
    get:
    path: "/api/v1/device/{deviceId}/GreenLight"
    responses:
    -
    code: "200"
    description: "Get the green light State."
    expectedValues: ["GreenLightControlState"]
    -
    code: "503"
    description: "service unavailable"
    expectedValues: []

    put:
    path: "/api/v1/device/{deviceId}/GreenLight"
    parameterNames: ["GreenLightControlState", "GreenLightTimer"]
    responses:
    -
    code: "204"
    description: "Set the green light."
    expectedValues: []
    -
    code: "503"
    description: "service unavailable"
    expectedValues: []

name: AmberLight
get:
  path: "/api/v1/device/{deviceId}/AmberLight"
  responses:
    -
      code: "200"
      description: "Get the green light State."
      expectedValues: ["AmberLightControlState"]
    -
      code: "503"
      description: "service unavailable"
      expectedValues: []

put:
  path: "/api/v1/device/{deviceId}/AmberLight"
  parameterNames: ["AmberLightControlState", "AmberLightTimer"]
  responses:
    -
      code: "204"
      description: "Set the green light."
      expectedValues: []
    -
      code: "503"
      description: "service unavailable"
      expectedValues: []
  • name: Buzzer
    get:
    path: "/api/v1/device/{deviceId}/Buzzer"
    responses:
    -
    code: "200"
    description: "Get the Buzzer State."
    expectedValues: ["BuzzerControlState"]
    -
    code: "503"
    description: "service unavailable"
    expectedValues: []

    put:
    path: "/api/v1/device/{deviceId}/Buzzer"
    parameterNames: ["BuzzerControlState", "BuzzerTimer"]
    responses:
    -
    code: "204"
    description: "Set the buzzer."
    expectedValues: []
    -
    code: "503"
    description: "service unavailable"
    expectedValues: []