Skip to content

Commit

Permalink
Merge pull request #72 from enbility/feature/spine13
Browse files Browse the repository at this point in the history
Add SPINE 1.3 data model changes
  • Loading branch information
DerAndereAndi authored Sep 6, 2023
2 parents 462aa4c + 1cfb748 commit 0d831ae
Show file tree
Hide file tree
Showing 20 changed files with 486 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"datagram": {
"header": {
"specificationVersion": "1.1.1",
"specificationVersion": "1.3.0",
"addressSource": {
"device": "TestDeviceAddress",
"entity": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"datagram": {
"header": {
"specificationVersion": "1.1.1",
"specificationVersion": "1.3.0",
"addressSource": {
"device": "TestDeviceAddress",
"entity": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"datagram": {
"header": {
"specificationVersion": "1.1.1",
"specificationVersion": "1.3.0",
"addressSource": {
"device": "TestDeviceAddress",
"entity": [
Expand All @@ -26,7 +26,7 @@
"nodeManagementDetailedDiscoveryData": {
"specificationVersionList": {
"specificationVersion": [
"1.1.1"
"1.3.0"
]
},
"deviceInformation": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"datagram": {
"header": {
"specificationVersion": "1.1.1",
"specificationVersion": "1.3.0",
"addressSource": {
"device": "TestDeviceAddress",
"entity": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"datagram": {
"header": {
"specificationVersion": "1.1.1",
"specificationVersion": "1.3.0",
"addressSource": {
"device": "TestDeviceAddress",
"entity": [
Expand Down
2 changes: 1 addition & 1 deletion spine/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package spine

import "github.com/enbility/eebus-go/spine/model"

var SpecificationVersion model.SpecificationVersionType = "1.1.1"
var SpecificationVersion model.SpecificationVersionType = "1.3.0"
30 changes: 30 additions & 0 deletions spine/function_data_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ func addSelectorToFilter[T any](filter model.FilterType, function model.Function
result.ElectricalConnectionPermittedValueSetListDataSelectors = castData[model.ElectricalConnectionPermittedValueSetListDataSelectorsType](data)
case model.FunctionTypeElectricalConnectionStateListData:
result.ElectricalConnectionStateListDataSelectors = castData[model.ElectricalConnectionStateListDataSelectorsType](data)
case model.FunctionTypeElectricalConnectionCharacteristicListData:
result.ElectricalConnectionCharacteristicListDataSelectors = castData[model.ElectricalConnectionCharacteristicListDataSelectorsType](data)
case model.FunctionTypeHvacOperationModeDescriptionListData:
result.HvacOperationModeDescriptionListDataSelectors = castData[model.HvacOperationModeDescriptionListDataSelectorsType](data)
case model.FunctionTypeHvacOverrunDescriptionListData:
Expand Down Expand Up @@ -179,6 +181,8 @@ func addSelectorToFilter[T any](filter model.FilterType, function model.Function
result.MeasurementDescriptionListDataSelectors = castData[model.MeasurementDescriptionListDataSelectorsType](data)
case model.FunctionTypeMeasurementListData:
result.MeasurementListDataSelectors = castData[model.MeasurementListDataSelectorsType](data)
case model.FunctionTypeMeasurementSeriesListData:
result.MeasurementSeriesListDataSelectors = castData[model.MeasurementSeriesListDataSelectorsType](data)
case model.FunctionTypeMeasurementThresholdRelationListData:
result.MeasurementThresholdRelationListDataSelectors = castData[model.MeasurementThresholdRelationListDataSelectorsType](data)
case model.FunctionTypeMessagingListData:
Expand Down Expand Up @@ -233,6 +237,10 @@ func addSelectorToFilter[T any](filter model.FilterType, function model.Function
result.PowerTimeSlotValueListDataSelectors = castData[model.PowerTimeSlotValueListDataSelectorsType](data)
case model.FunctionTypeSensingListData:
result.SensingListDataSelectors = castData[model.SensingListDataSelectorsType](data)
case model.FunctionTypeSessionIdentificationListData:
result.SessionIdentificationListDataSelectors = castData[model.SessionIdentificationListDataSelectorsType](data)
case model.FunctionTypeSessionMeasurementRelationListData:
result.SessionMeasurementRelationListDataSelectors = castData[model.SessionMeasurementRelationListDataSelectorsType](data)
case model.FunctionTypeSetpointConstraintsListData:
result.SetpointConstraintsListDataSelectors = castData[model.SetpointConstraintsListDataSelectorsType](data)
case model.FunctionTypeSetpointDescriptionListData:
Expand All @@ -245,6 +253,8 @@ func addSelectorToFilter[T any](filter model.FilterType, function model.Function
result.SmartEnergyManagementPsPriceDataSelectors = castData[model.SmartEnergyManagementPsPriceDataSelectorsType](data)
case model.FunctionTypeSpecificationVersionListData:
result.SpecificationVersionListDataSelectors = castData[model.SpecificationVersionListDataSelectorsType](data)
case model.FunctionTypeStateInformationListData:
result.StateInformationListDataSelectors = castData[model.StateInformationListDataSelectorsType](data)
case model.FunctionTypeSupplyConditionListData:
result.SupplyConditionListDataSelectors = castData[model.SupplyConditionListDataSelectorsType](data)
case model.FunctionTypeSupplyConditionThresholdRelationListData:
Expand Down Expand Up @@ -356,6 +366,8 @@ func addElementToFilter[T any](filter model.FilterType, function model.FunctionT
result.ElectricalConnectionPermittedValueSetDataElements = castData[model.ElectricalConnectionPermittedValueSetDataElementsType](data)
case model.FunctionTypeElectricalConnectionStateListData:
result.ElectricalConnectionStateDataElements = castData[model.ElectricalConnectionStateDataElementsType](data)
case model.FunctionTypeElectricalConnectionCharacteristicListData:
result.ElectricalConnectionCharacteristicDataElements = castData[model.ElectricalConnectionCharacteristicDataElementsType](data)
case model.FunctionTypeHvacOperationModeDescriptionListData:
result.HvacOperationModeDescriptionDataElements = castData[model.HvacOperationModeDescriptionDataElementsType](data)
case model.FunctionTypeHvacOverrunDescriptionListData:
Expand Down Expand Up @@ -402,6 +414,8 @@ func addElementToFilter[T any](filter model.FilterType, function model.FunctionT
result.MeasurementDescriptionDataElements = castData[model.MeasurementDescriptionDataElementsType](data)
case model.FunctionTypeMeasurementListData:
result.MeasurementDataElements = castData[model.MeasurementDataElementsType](data)
case model.FunctionTypeMeasurementSeriesListData:
result.MeasurementSeriesDataElements = castData[model.MeasurementSeriesDataElementsType](data)
case model.FunctionTypeMeasurementThresholdRelationListData:
result.MeasurementThresholdRelationDataElements = castData[model.MeasurementThresholdRelationDataElementsType](data)
case model.FunctionTypeMessagingListData:
Expand Down Expand Up @@ -488,6 +502,10 @@ func addElementToFilter[T any](filter model.FilterType, function model.FunctionT
result.PowerTimeSlotValueDataElements = castData[model.PowerTimeSlotValueDataElementsType](data)
case model.FunctionTypeSensingListData:
result.SensingDataElements = castData[model.SensingDataElementsType](data)
case model.FunctionTypeSessionIdentificationListData:
result.SessionIdentificationDataElements = castData[model.SessionIdentificationDataElementsType](data)
case model.FunctionTypeSessionMeasurementRelationListData:
result.SessionMeasurementRelationDataElements = castData[model.SessionMeasurementRelationDataElementsType](data)
case model.FunctionTypeSetpointConstraintsListData:
result.SetpointConstraintsDataElements = castData[model.SetpointConstraintsDataElementsType](data)
case model.FunctionTypeSetpointDescriptionListData:
Expand All @@ -504,6 +522,8 @@ func addElementToFilter[T any](filter model.FilterType, function model.FunctionT
result.SmartEnergyManagementPsPriceDataElements = castData[model.SmartEnergyManagementPsPriceDataElementsType](data)
case model.FunctionTypeSpecificationVersionListData:
result.SpecificationVersionDataElements = castData[model.SpecificationVersionDataElementsType](data)
case model.FunctionTypeStateInformationListData:
result.StateInformationDataElements = castData[model.StateInformationDataElementsType](data)
case model.FunctionTypeSubscriptionManagementDeleteCall:
result.SubscriptionManagementDeleteCallElements = castData[model.SubscriptionManagementDeleteCallElementsType](data)
case model.FunctionTypeSubscriptionManagementEntryListData:
Expand Down Expand Up @@ -635,6 +655,8 @@ func createCmd[T any](function model.FunctionType, data *T) model.CmdType {
result.ElectricalConnectionPermittedValueSetListData = castData[model.ElectricalConnectionPermittedValueSetListDataType](data)
case model.FunctionTypeElectricalConnectionStateListData:
result.ElectricalConnectionStateListData = castData[model.ElectricalConnectionStateListDataType](data)
case model.FunctionTypeElectricalConnectionCharacteristicListData:
result.ElectricalConnectionCharacteristicListData = castData[model.ElectricalConnectionCharacteristicListDataType](data)
case model.FunctionTypeHvacOperationModeDescriptionListData:
result.HvacOperationModeDescriptionListData = castData[model.HvacOperationModeDescriptionListDataType](data)
case model.FunctionTypeHvacOverrunDescriptionListData:
Expand Down Expand Up @@ -681,6 +703,8 @@ func createCmd[T any](function model.FunctionType, data *T) model.CmdType {
result.MeasurementDescriptionListData = castData[model.MeasurementDescriptionListDataType](data)
case model.FunctionTypeMeasurementListData:
result.MeasurementListData = castData[model.MeasurementListDataType](data)
case model.FunctionTypeMeasurementSeriesListData:
result.MeasurementSeriesListData = castData[model.MeasurementSeriesListDataType](data)
case model.FunctionTypeMeasurementThresholdRelationListData:
result.MeasurementThresholdRelationListData = castData[model.MeasurementThresholdRelationListDataType](data)
case model.FunctionTypeMessagingListData:
Expand Down Expand Up @@ -753,6 +777,10 @@ func createCmd[T any](function model.FunctionType, data *T) model.CmdType {
result.SensingDescriptionData = castData[model.SensingDescriptionDataType](data)
case model.FunctionTypeSensingListData:
result.SensingListData = castData[model.SensingListDataType](data)
case model.FunctionTypeSessionIdentificationListData:
result.SessionIdentificationListData = castData[model.SessionIdentificationListDataType](data)
case model.FunctionTypeSessionMeasurementRelationListData:
result.SessionMeasurementRelationListData = castData[model.SessionMeasurementRelationListDataType](data)
case model.FunctionTypeSetpointConstraintsListData:
result.SetpointConstraintsListData = castData[model.SetpointConstraintsListDataType](data)
case model.FunctionTypeSetpointDescriptionListData:
Expand All @@ -769,6 +797,8 @@ func createCmd[T any](function model.FunctionType, data *T) model.CmdType {
result.SmartEnergyManagementPsPriceData = castData[model.SmartEnergyManagementPsPriceDataType](data)
case model.FunctionTypeSpecificationVersionListData:
result.SpecificationVersionListData = castData[model.SpecificationVersionListDataType](data)
case model.FunctionTypeStateInformationListData:
result.StateInformationListData = castData[model.StateInformationListDataType](data)
case model.FunctionTypeSupplyConditionListData:
result.SupplyConditionListData = castData[model.SupplyConditionListDataType](data)
case model.FunctionTypeSupplyConditionThresholdRelationListData:
Expand Down
2 changes: 2 additions & 0 deletions spine/model/bill.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,15 @@ type BillDescriptionDataType struct {
BillWriteable *bool `json:"billWriteable,omitempty"`
UpdateRequired *bool `json:"updateRequired,omitempty"`
SupportedBillType []BillTypeType `json:"supportedBillType,omitempty"`
SessionId *SessionIdType `json:"sessionId,omitempty"`
}

type BillDescriptionDataElementsType struct {
BillId *ElementTagType `json:"billId,omitempty"`
BillWriteable *ElementTagType `json:"billWriteable,omitempty"`
UpdateRequired *ElementTagType `json:"updateRequired,omitempty"`
SupportedBillType *ElementTagType `json:"supportedBillType,omitempty"`
SessionId *ElementTagType `json:"sessionId,omitempty"`
}

type BillDescriptionListDataType struct {
Expand Down
Loading

0 comments on commit 0d831ae

Please sign in to comment.