C# Class Yodiwo.API.Plegma.Port

显示文件 Open project: yodiwo/plegma Class Usage Examples

Public Properties

Property Type Description
Color string
ConfFlags ePortConf
Description string
LastUpdatedTimestamp ulong
Name string
PortKey string
PortModelId string
RevNum uint
Semantics string
Size int
State string
Type ePortType
ioDirection ioPortDirection

Public Methods

Method Description
DeepClone ( ) : Port
GetStateObject ( ) : object
IncRevNum ( ) : void
IsNumeric ( ) : bool
Port ( ) : System
Port ( PortKey portKey, ePortType type, ioPortDirection ioDirection, string portmodelid = null ) : System
SetState ( string newState, System.DateTime timestamp = null ) : void
State2Value ( ePortType portType, string state ) : object
ToString ( ) : string
Update ( Port otherPort ) : void
Update_Except_States ( Port otherPort ) : void
Value2State ( object value ) : string
ePortType2Type ( ePortType PortType ) : Type

Method Details

DeepClone() public method

public DeepClone ( ) : Port
return Port

GetStateObject() public method

public GetStateObject ( ) : object
return object

IncRevNum() public method

public IncRevNum ( ) : void
return void

IsNumeric() public method

public IsNumeric ( ) : bool
return bool

Port() public method

public Port ( ) : System
return System

Port() public method

public Port ( PortKey portKey, ePortType type, ioPortDirection ioDirection, string portmodelid = null ) : System
portKey PortKey
type ePortType
ioDirection ioPortDirection
portmodelid string
return System

SetState() public method

public SetState ( string newState, System.DateTime timestamp = null ) : void
newState string
timestamp System.DateTime
return void

State2Value() public static method

public static State2Value ( ePortType portType, string state ) : object
portType ePortType
state string
return object

ToString() public method

public ToString ( ) : string
return string

Update() public method

public Update ( Port otherPort ) : void
otherPort Port
return void

Update_Except_States() public method

public Update_Except_States ( Port otherPort ) : void
otherPort Port
return void

Value2State() public static method

public static Value2State ( object value ) : string
value object
return string

ePortType2Type() public static method

public static ePortType2Type ( ePortType PortType ) : Type
PortType ePortType
return System.Type

Property Details

Color public_oe property

Color of port value
public string Color
return string

ConfFlags public_oe property

Configuration flags for port
public ePortConf ConfFlags
return ePortConf

Description public_oe property

Description of Port to show in Cyan (tooltip, etc)
public string Description
return string

LastUpdatedTimestamp public_oe property

Timestamp of the last action that updated the port value and/or revision number
public ulong LastUpdatedTimestamp
return ulong

Name public_oe property

Friendly name of this Port (as it will appear in the Cyan UI and blocks)
public string Name
return string

PortKey public_oe property

Globally unique string identifying this port; Construct it using the PortKey constructor
public string PortKey
return string

PortModelId public_oe property

id of Port that can Match to a ThingModelType
public string PortModelId
return string

RevNum public_oe property

Port state sequence number: incremented by the Cloud server at every state update, so that Node and servers stay in sync
public uint RevNum
return uint

Semantics public_oe property

semantics of values that Port sends / receives
public string Semantics
return string

Size public_oe property

Size of port value
public int Size
return int

State public_oe property

Current (at latest update/sampling/trigger/etc) value of Port as String. Contains a string representation of the port's state, encoded according to the port's ePortType On receiving events the Cloud Server will attempt to parse the State based on its ePortType When sending events the Cloud Server will encode the new state into a string, again according to the Port's ePortType
public string State
return string

Type public_oe property

type (ePortType) of values that each Port sends / receives
public ePortType Type
return ePortType

ioDirection public_oe property

Direction (ioPortDirection) of Port
public ioPortDirection ioDirection
return ioPortDirection