Skip to content

spinalcom/spinal-model-bmsnetwork

Repository files navigation

spinal-model-bmsnetwork

Model + service using the spinal-model-graph to do operation for Network representation.

Description

Model + service using the spinal-model-graph to do operation for Network representation.

API

Interface

InputDataDevice

Kind: interface

| Param | Type | Value | Comment | | --- | --- | | | | id | string | | | name | string | | | type | string | | | path | string | | | children | (InputDataEndpoint | InputDataEndpointGroup | InputDataDevice)[] | | | nodeTypeName | string | BmsDevice | should equal to SpinalBmsDevice.nodeTypeName |

InputDataEndpointGroup

Kind: interface

Param Type Value Comment
id string
name string
type string
path string
children InputDataEndpoint[]
nodeTypeName string BmsEndpointGroup should equal to SpinalBmsEndpointGroup.nodeTypeName

InputDataDevice

Kind: interface

Param Type Value Comment
id string
name string
path string
currentValue string
unit (InputDataEndpoint | InputDataEndpointGroup | InputDataDevice)[]
dataType InputDataEndpointDataType
type InputDataEndpointType
nodeTypeName string BmsEndpoint should equal to SpinalBmsEndpoint.nodeTypeName

ConfigService

Kind: interface

Param Type Value Comment
contextName string
contextType string
networkType string
networkName string

Classes

SpinalBmsDeviceModel
SpinalBmsEndpointModel
SpinalBmsEndpointGroupModel
SpinalBmsNetworkModel
NetworkService

Functions

genUID(constructor)string

SpinalBmsDevice ⇐ Model

Kind: global class
Extends: Model
Export:
Properties

Name Type
id; spinal.Str
name; spinal.Str
type; spinal.Str
path; spinal.Str

SpinalBmsDevice.SpinalBmsDevice

Kind: static class of SpinalBmsDevice

new SpinalBmsDevice([name], [type], [path], [id])

Creates an instance of SpinalBmsDevice.

Param Type Default
[name] string "''"
[type] string "''"
[path] string "''"
[id] string "genUID('SpinalBmsDevice')"

SpinalBmsEndpoint ⇐ Model

Kind: global class
Extends: Model
Export:
Properties

Name Type
id spinal.Str
path spinal.Str
currentValue spinal.Str | spinal.Val
unit spinal.Str
type spinal.Str
dataType spinal.Str

SpinalBmsEndpoint.SpinalBmsEndpoint

Kind: static class of SpinalBmsEndpoint

new SpinalBmsEndpoint([name], [path], [currentValue], [unit], [dataType], [type], [id])

Creates an instance of SpinalBmsEndpoint.

Param Type Default
[name] string "''"
[path] string "''"
[currentValue] string | number "''"
[unit] string "''"
[dataType] string "''"
[type] string "''"
[id] string "genUID('SpinalBmsEndpoint')"

SpinalBmsEndpointGroup ⇐ Model

Kind: global class
Extends: Model
Export:
Properties

Name Type
id; spinal.Str
name; spinal.Str
type; spinal.Str
path; spinal.Str

SpinalBmsEndpointGroup.SpinalBmsEndpointGroup

Kind: static class of SpinalBmsEndpointGroup

new SpinalBmsEndpointGroup([name], [type], [path], [id])

Creates an instance of SpinalBmsEndpointGroup.

Param Type Default
[name] string "''"
[type] string "''"
[path] string "''"
[id] string "genUID('SpinalBmsNetwork')"

SpinalBmsNetwork ⇐ Model

Kind: global class
Extends: Model
Export:
Properties

Name Type
name spinal.Str
type spinal.Str
id spinal.Str

SpinalBmsNetwork.SpinalBmsNetwork

Kind: static class of SpinalBmsNetwork

new SpinalBmsNetwork([name], [type], [id])

Creates an instance of SpinalBmsNetwork.

Param Type Default
[name] string "''"
[type] string "''"
[id] string "genUID('SpinalBmsNetwork')"

NetworkService

Kind: global class
Export:

networkService.init(forgeFile, configService, [autoCreate]) ⇒ Promise.<{contextId:string, networkId: string}>

Kind: instance method of NetworkService

Param Type Default
forgeFile spinal.Model
configService ConfigService
[autoCreate] boolean true

networkService.createNewBmsNetwork(parentId, typeName, networkName) ⇒ Promise.<any>

Kind: instance method of NetworkService

Param Type
parentId string
typeName string
networkName string

networkService.createNewBmsDevice(parentId, obj) ⇒ Promise.<any>

Kind: instance method of NetworkService

Param Type
parentId string
obj InputDataDevice

networkService.createNewBmsEndpointGroup(parentId, obj) ⇒ Promise.<any>

Kind: instance method of NetworkService

Param Type
parentId string
obj InputDataEndpointGroup

networkService.createNewBmsEndpoint(parentId, obj) ⇒ Promise.<any>

Kind: instance method of NetworkService

Param Type
parentId string
obj InputDataEndpoint

networkService.updateData(obj, [date]) ⇒ Promise.<void>

Kind: instance method of NetworkService

Param Type Default
obj InputDataDevice
[date] *

networkService.updateEndpoint(node, reference, [date]) ⇒ Promise.<void>

Kind: instance method of NetworkService

Param Type Default
node *
reference InputDataEndpoint
[date] *

networkService.getNetworks() ⇒ Promise.<Array.<string>>

Kind: instance method of NetworkService

networkService.getEndpoint(idDevice) ⇒ Promise.<Array.<string>>

Kind: instance method of NetworkService

Param Type
idDevice string

networkService.getInfo(idNode) ⇒ spinal.Model

Kind: instance method of NetworkService

Param Type
idNode string

networkService.getData(idNode) ⇒ Promise.<spinal.Model>

Kind: instance method of NetworkService

Param Type
idNode string

networkService.getTimeseries(idEndpoint) ⇒ Promise.<SpinalTimeSeries>

Kind: instance method of NetworkService

Param Type
idEndpoint string

networkService.setEndpointValue(idEndpoint, value, [date]) ⇒ Promise.<boolean>

Kind: instance method of NetworkService

Param Type Default
idEndpoint string
value string | boolean | number
[date] number | string | Date

NetworkService.NetworkService

Kind: static class of NetworkService

new NetworkService()

Creates an instance of NetworkService.

InputDataEndpointDataType : enum

Kind: global enum

InputDataEndpointType : enum

Kind: global enum

genUID(constructor) ⇒ string

Kind: global function

Param Type
constructor string

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors