Click or drag to resize

Nexpaq Namespace

The Nexpaq namespace is the main namesapce of the platform core.
Classes
  ClassDescription
Public classCode exampleModuleDriver
As NexpaqCore cannot contain code to work with any of thousands modules it uses Module Drivers that can be exported and imported as JSON
Public classModuleDriverCommand
Module driver command.
Public classModuleDriverCommandArgument
Module driver command argument description.
Public classModuleDriverCommandDataItem
Describes how data item should be generated, with default value or from arguments
Public classCode exampleModuleDriverDataItem
Represents a response from a module.
Public classModuleDriverDataItemVariable
Module driver message (data \ response) processing rule.
Public classModuleDriverField
Represent a basic data structure that is used as a shared building block between drivers models.
Examples
Usage of ModuleDriver
{
    "type": "string type of your module", // example: moduware.module.led
    "version": "version of your module driver", // example: 1.1.1
    "commands": [ // Commands we can send to module an object of ModuleDriverCommand
        ...,
        ...
        ],
    "data": [ // Data that comes from module an object of ModuleDriverDataItem class
        ...,
        ...
        ]
}
Examples
Usage of ModuleDriverCommand
{
    "name": "string name of command", // example: SetRGB
    "title": "string title of command (human readable)", //example: Set color in RGB
    "description": "human readable desciption for command",
    "arguments": [
        {
          "name": "string argument name", // argument name
          "validation": "string validation rule" // validation rule
        },
        {...},
        {...}
    ],
    "command": "string command id" // example: 2700,
    "data" : [
        {
            "defaultValue": int // example: 3
            "convert": bool // example true if convert is allowed,
            "format": "string convert format" // example: ({1} >> 8)
        },
        {...},
        {...}
    ]
}
Examples
Usage of ModuleDriverDataItem
{
    "name": "name of data item", // example: moduware.module.led
    "title": "...", // example: 1.1.1
    "description": "...", // example: 1.1.1
    "variables": [ // data we receive from a module, an object of ModuleDriverDataItemVariable
        ...,
        ...
        ]
}