sunspec 0.9.0

SunSpec 1.1 compliant library with tokio support
Documentation
{
    "group": {
        "desc": "A basic string combiner",
        "label": "String Combiner (Current)",
        "name": "string_combiner_current",
        "groups": [
            {
                "count": 0,
                "name": "string",
                "points": [
                    {
                        "desc": "Uniquely identifies this input set",
                        "label": "ID",
                        "mandatory": "M",
                        "name": "InID",
                        "size": 1,
                        "type": "uint16"
                    },
                    {
                        "desc": "String Input Event Flags",
                        "label": "Input Event",
                        "mandatory": "M",
                        "name": "InEvt",
                        "size": 2,
                        "symbols": [
                            {
                                "name": "LOW_VOLTAGE",
                                "value": 0
                            },
                            {
                                "name": "LOW_POWER",
                                "value": 1
                            },
                            {
                                "name": "LOW_EFFICIENCY",
                                "value": 2
                            },
                            {
                                "name": "CURRENT",
                                "value": 3
                            },
                            {
                                "name": "VOLTAGE",
                                "value": 4
                            },
                            {
                                "name": "POWER",
                                "value": 5
                            },
                            {
                                "name": "PR",
                                "value": 6
                            },
                            {
                                "name": "DISCONNECTED",
                                "value": 7
                            },
                            {
                                "name": "FUSE_FAULT",
                                "value": 8
                            },
                            {
                                "name": "COMBINER_FUSE_FAULT",
                                "value": 9
                            },
                            {
                                "name": "COMBINER_CABINET_OPEN",
                                "value": 10
                            },
                            {
                                "name": "TEMP",
                                "value": 11
                            },
                            {
                                "name": "GROUNDFAULT",
                                "value": 12
                            },
                            {
                                "name": "REVERSED_POLARITY",
                                "value": 13
                            },
                            {
                                "name": "INCOMPATIBLE",
                                "value": 14
                            },
                            {
                                "name": "COMM_ERROR",
                                "value": 15
                            },
                            {
                                "name": "INTERNAL_ERROR",
                                "value": 16
                            },
                            {
                                "name": "THEFT",
                                "value": 17
                            },
                            {
                                "name": "ARC_DETECTED",
                                "value": 18
                            }
                        ],
                        "type": "bitfield32"
                    },
                    {
                        "desc": "String Input Vendor Event Flags",
                        "label": "Input Event Vendor",
                        "name": "InEvtVnd",
                        "size": 2,
                        "type": "bitfield32"
                    },
                    {
                        "desc": "String Input Current",
                        "label": "Amps",
                        "mandatory": "M",
                        "name": "InDCA",
                        "sf": "DCA_SF",
                        "size": 1,
                        "type": "int16",
                        "units": "A"
                    },
                    {
                        "desc": "String Input Amp-Hours",
                        "label": "Amp-hours",
                        "name": "InDCAhr",
                        "sf": "DCAhr_SF",
                        "size": 2,
                        "type": "uint32",
                        "units": "Ah"
                    }
                ],
                "type": "group"
            }
        ],
        "points": [
            {
                "desc": "Model identifier",
                "label": "Model ID",
                "mandatory": "M",
                "name": "ID",
                "size": 1,
                "static": "S",
                "type": "uint16",
                "value": 401
            },
            {
                "desc": "Model length",
                "label": "Model Length",
                "mandatory": "M",
                "name": "L",
                "size": 1,
                "static": "S",
                "type": "uint16"
            },
            {
                "desc": "Current scale factor",
                "mandatory": "M",
                "name": "DCA_SF",
                "size": 1,
                "type": "sunssf"
            },
            {
                "desc": "Amp-hour scale factor",
                "name": "DCAhr_SF",
                "size": 1,
                "type": "sunssf"
            },
            {
                "desc": "Voltage scale factor",
                "name": "DCV_SF",
                "size": 1,
                "type": "sunssf"
            },
            {
                "desc": "Maximum DC Current Rating",
                "label": "Rating",
                "mandatory": "M",
                "name": "DCAMax",
                "sf": "DCA_SF",
                "size": 1,
                "type": "uint16",
                "units": "A"
            },
            {
                "desc": "Number of Inputs",
                "label": "N",
                "mandatory": "M",
                "name": "N",
                "size": 1,
                "type": "count"
            },
            {
                "desc": "Bitmask value.  Events",
                "label": "Event",
                "mandatory": "M",
                "name": "Evt",
                "size": 2,
                "symbols": [
                    {
                        "name": "LOW_VOLTAGE",
                        "value": 0
                    },
                    {
                        "name": "LOW_POWER",
                        "value": 1
                    },
                    {
                        "name": "LOW_EFFICIENCY",
                        "value": 2
                    },
                    {
                        "name": "CURRENT",
                        "value": 3
                    },
                    {
                        "name": "VOLTAGE",
                        "value": 4
                    },
                    {
                        "name": "POWER",
                        "value": 5
                    },
                    {
                        "name": "PR",
                        "value": 6
                    },
                    {
                        "name": "DISCONNECTED",
                        "value": 7
                    },
                    {
                        "name": "FUSE_FAULT",
                        "value": 8
                    },
                    {
                        "name": "COMBINER_FUSE_FAULT",
                        "value": 9
                    },
                    {
                        "name": "COMBINER_CABINET_OPEN",
                        "value": 10
                    },
                    {
                        "name": "TEMP",
                        "value": 11
                    },
                    {
                        "name": "GROUNDFAULT",
                        "value": 12
                    },
                    {
                        "name": "REVERSED_POLARITY",
                        "value": 13
                    },
                    {
                        "name": "INCOMPATIBLE",
                        "value": 14
                    },
                    {
                        "name": "COMM_ERROR",
                        "value": 15
                    },
                    {
                        "name": "INTERNAL_ERROR",
                        "value": 16
                    },
                    {
                        "name": "THEFT",
                        "value": 17
                    },
                    {
                        "name": "ARC_DETECTED",
                        "value": 18
                    }
                ],
                "type": "bitfield32"
            },
            {
                "desc": "Bitmask value.  Vendor defined events",
                "label": "Vendor Event",
                "name": "EvtVnd",
                "size": 2,
                "type": "bitfield32"
            },
            {
                "desc": "Total measured current",
                "label": "Amps",
                "mandatory": "M",
                "name": "DCA",
                "sf": "DCA_SF",
                "size": 1,
                "type": "int16",
                "units": "A"
            },
            {
                "desc": "Total metered Amp-hours",
                "label": "Amp-hours",
                "name": "DCAhr",
                "sf": "DCAhr_SF",
                "size": 2,
                "type": "uint32",
                "units": "Ah"
            },
            {
                "desc": "Output Voltage",
                "label": "Voltage",
                "name": "DCV",
                "sf": "DCV_SF",
                "size": 1,
                "type": "uint16",
                "units": "V"
            },
            {
                "desc": "Internal operating temperature",
                "label": "Temp",
                "name": "Tmp",
                "size": 1,
                "type": "int16",
                "units": "C"
            }
        ],
        "type": "group",
        "detail": "This model is SUPERSEDED by model 403"
    },
    "id": 401
}