Jump to content

SENSBLUE ATLAS/Datasheet: Difference between revisions

No edit summary
No edit summary
Line 1,436: Line 1,436:


=== 30. Analoglnputs Actor ===
=== 30. Analoglnputs Actor ===
==== 30.1 App Interfacing ====
User App interface and functionalities exposed to the open part of the MQTT broker. Simplified interface to configure and obtain peripherals data. Connecting to the broker for this Area requires no credencials.
===== 30.1.1 Configurations =====
'''  Topic: analoglnputs/config/in - Set ADC channels configurations'''
'''mode'''
* continuous
* single
'''type'''
* voltage
* current
<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "AI1": {
        "mode": "single",
        "type": "voltage"
      },
      "AI2": {
        "mode": "single",
        "type": "voltage"
      },
      "AI3": {
        "mode": "single",
        "type": "current"
      },
      "AI4": {
        "mode": "single",
        "type": "current"
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: analoglnputs/config/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "AI1": {
        "success": true
      },
      "AI2": {
        "success": true
      },
      "AI3": {
        "success": true
      },
      "AI4": {
        "success": true
      }
    }
  }
}
</syntaxhighlight>
===== 30.1.2 Runtime Data =====
'''Topic: analoglnputs/runtime/in.'''
action:
* READ
* PAUSE (only applicable in continuous mode)
* RESUME (only applicable in continuous mode)
<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "AI1": {
        "action": "READ"
      },
      "AI2": {
        "action": "READ"
      },
      "AI3": {
        "action": "READ"
      },
      "AI4": {
        "action": "READ"
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: analoglnputs/runtime/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "AI1": {
        "success": true,
        "value": <_FLOAT_>
      },
      "AI2": {
        "success": true,
        "value": <_FLOAT_>
      },
      "AI3": {
        "success": true,
        "value": <_FLOAT_>
      },
      "AI4": {
        "success": true,
        "value": <_FLOAT_>
      }
    }
  }
}
</syntaxhighlight>
=== 31. Analog Outputs Actor ===
==== 31.1 App Interfacing ====
User App interface and functionalities exposed to the open part of the MQTT broker. Simplified interface to configure and obtain peripherals data. Connecting to the broker for this Area requires no credencials.
===== 31.1.1 Set analog outputs signal =====
Req-Topic: analogOutputs/config/in
'''Output:''' current within 0-20 mA
'''mode:''' on/off<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "mode": "on",
      "AO1": {
        "current": <_FLOAT_>
      },
      "AO2": {
        "current": <_FLOAT_>
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: analogOutputs/config/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "mode": "on",
      "AO1": {
        "success": true,
        "current": <_FLOAT_>
      },
      "AO2": {
        "success": true,
        "current": <_FLOAT_>
      }
    }
  }
}
</syntaxhighlight>
===== 31.1.2 Set analog outputs =====
Req-Topic: analogOutputs/runtime/in
'''current:''' current within 0-20 mA<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "AO1": {
        "action": "SET",
        "current": <_FLOAT_>
      },
      "AO2": {
        "action": "SET",
        "current": <_FLOAT_>
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: analoigOutputs/runtime/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "AO1": {
        "success": true,
        "current": <_FLOAT_>
      },
      "AO2": {
        "success": true,
        "current": <_FLOAT_>
      }
    }
  }
}
</syntaxhighlight>
===== 31.1.3 Read analog outputs settings =====
Req-Topic: analogOutputs/runtime/in
'''current''': current within 0-20 mA<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "AO1": {
        "action": "READ"
      },
      "AO2": {
        "action": "READ"
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: analogOutputs/runtime/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "AO1": {
        "success": true,
        "current": <_FLOAT_>
      },
      "AO2": {
        "success": true,
        "current": <_FLOAT_>
      }
    }
  }
}
</syntaxhighlight>
=== 32. Digital lnputs Actor ===
==== 32.1 App Interfacing ====
User App interface and functionalities exposed to the open part of the MQTT broker. Simplified interface to configure and obtain peripherals data. Connecting to the broker for this Area requires no credentials.
===== 32.1.1 Set digital input pin/pins speed fast/slow =====
The '''fast''' speed setting supports edge detection speed up to 100 Hz and the '''slow''' speed settings supports up to 10 Hz.
'''Fast Mode''' generates a message on every I/O state change, which may result in a '''high message payload''' during operation. Fast Mode should therefore only be enabled when '''strictly required'''.
Req-Topic: digitallnputs/config/in<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "DI1": {
        "speed": "fast"
      },
      "DI2": {
        "speed": "slow"
      },
      "DI3": {
        "speed": "fast"
      },
      "DI4": {
        "speed": "fast"
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: digitallnputs/config/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "DI1": {
        "success": true,
        "speed": "fast"
      },
      "DI2": {
        "success": true,
        "speed": "slow"
      },
      "DI3": {
        "success": true,
        "speed": "fast"
      },
      "DI4": {
        "success": true,
        "speed": "fast"
      }
    }
  }
}
</syntaxhighlight>
===== 32.1.2 Get all digital input pins state =====
Req-Topic: digitallnputs/runtime/in<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "action": "READ"
  }
}
</syntaxhighlight>Reply-Topic: digitallnputs/runtime/out
state: high/low<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "DI1": {
        "success": true,
        "state": "high"
      },
      "DI2": {
        "success": true,
        "state": "low"
      },
      "DI3": {
        "success": true,
        "state": "high"
      },
      "DI4": {
        "success": true,
        "state": "low"
      }
    }
  }
}
</syntaxhighlight>
=== 33. Digital Outputs Actor ===
==== 33.1 App Interfacing ====
User App interface and functionalities exposed to the open part of the MQTT broker. Simplified interface to configure and obtain peripherals data. Connecting to the broker for this area requires no credencials.
===== 33.1.1 Get all digital output pins state =====
Req-Topic: digitalOutputs/runtime/in<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "action": "READ"
  }
} 
</syntaxhighlight>Reply-Topic: digitalOutputs/runtime/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "DO1": {
        "success": true,
        "state": "low"
      },
      "DO2": {
        "success": true,
        "state": "high"
      },
      "DO3": {
        "success": true,
        "state": "high"
      },
      "DO4": {
        "success": true,
        "state": "low"
      },
      "DO5": {
        "success": true,
        "state": "low"
      },
      "DO6": {
        "success": true,
        "state": "low"
      },
      "DO7": {
        "success": true,
        "state": "low"
      },
      "DO8": {
        "success": true,
        "state": "low"
      }
    }
  }
}
</syntaxhighlight>
===== 33.1.2 Set all digital output pins state =====
Req-Topic: digitalOutputs/runtime/in<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskParams": {
      "DO1": {
        "action": "SET",
        "state": "low"
      },
      "DO2": {
        "action": "SET",
        "state": "high"
      },
      "DO3": {
        "action": "SET",
        "state": "high"
      },
      "DO4": {
        "action": "SET",
        "state": "low"
      },
      "DO5": {
        "action": "SET",
        "state": "low"
      },
      "DO6": {
        "action": "SET",
        "state": "low"
      },
      "DO7": {
        "action": "SET",
        "state": "low"
      },
      "DO8": {
        "action": "SET",
        "state": "low"
      }
    }
  }
}
</syntaxhighlight>Reply-Topic: digitalOutputs/runtime/out<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "D01": {
        "success": true,
        "state": "low"
      },
      "D02": {
        "success": true,
        "state": "high"
      },
      "D03": {
        "success": true,
        "state": "high"
      },
      "D04": {
        "success": true,
        "state": "high"
      },
      "D05": {
        "success": true,
        "state": "high"
      },
      "D06": {
        "success": true,
        "state": "low"
      },
      "D07": {
        "success": true,
        "state": "low"
      },
      "D08": {
        "success": true,
        "state": "low"
      }
    }
  }
}
</syntaxhighlight>
==== 33.2 Notes ====
If the busi2c-3 is not powered, we will get this:
Topic: '''digit a lOutputs/runtime/ out''' <syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "DO1": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO2": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO3": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO4": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO5": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO6": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO7": {
        "success": false,
        "state": "DO_not_powered"
      },
      "DO8": {
        "success": false,
        "state": "DO_not_powered"
      }
    }
  }
}
</syntaxhighlight>
=== 34. Joystick Actor ===
==== 34.1 App Interfacing ====
User App interface and functionalities exposed to the open part of the MQTT broker. Simplified interface to configure and obtain peripherals data. Connecting to the broker for this Area requires no credencials.
===== 34.1.1 Get all joystick pins state =====
Req-Topic: joystick/runtime/in<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "action": "READ"
  }
} 
</syntaxhighlight>Reply-Topic: joystick//runtime/out
state: pressed/released<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "taskResult": {
      "JLEFT": {
        "success": true,
        "state": "pressed"
      },
      "JRIGHT": {
        "success": true,
        "state": "released"
      },
      "JUP": {
        "success": true,
        "state": "released"
      },
      "JDOWN": {
        "success": true,
        "state": "released"
      },
      "JCENTER": {
        "success": true,
        "state": "released"
      }
    }
  }
}
</syntaxhighlight>
=== 35. Included Software Stack ===
[[File:AtlasCode.svg|center|frameless|583x583px]]