C# Class HA4IoT.Hardware.CCTools.CCToolsBoardBase

Inheritance: IDevice
Show file Open project: chkr1011/CK.HomeAutomation Class Usage Examples

Public Methods

Method Description
CommitChanges ( bool force = false ) : void
FetchState ( ) : void

Compares the peeked state and the previous state and fires events if the state has changed. This method calls method PeekState automatically if the state is not peeked.

GetCommittedState ( ) : byte[]
GetState ( ) : byte[]
PeekState ( ) : void

Reads the current state from the port expander but does not fire any events. Call FetchState after all port expanders are polled (peeked) to fire the events.

SetState ( byte state ) : void

Protected Methods

Method Description
CCToolsBoardBase ( DeviceId id, IPortExpanderDriver portExpanderDriver ) : System
GetPort ( int number ) : CCToolsBoardPort

Private Methods

Method Description
GetPortState ( int pinNumber ) : BinaryState
JsonValueToByteArray ( JsonArray value ) : byte[]
SetPortState ( int pinNumber, BinaryState state ) : void

Method Details

CCToolsBoardBase() protected method

protected CCToolsBoardBase ( DeviceId id, IPortExpanderDriver portExpanderDriver ) : System
id DeviceId
portExpanderDriver IPortExpanderDriver
return System

CommitChanges() public method

public CommitChanges ( bool force = false ) : void
force bool
return void

FetchState() public method

Compares the peeked state and the previous state and fires events if the state has changed. This method calls method PeekState automatically if the state is not peeked.
public FetchState ( ) : void
return void

GetCommittedState() public method

public GetCommittedState ( ) : byte[]
return byte[]

GetPort() protected method

protected GetPort ( int number ) : CCToolsBoardPort
number int
return CCToolsBoardPort

GetState() public method

public GetState ( ) : byte[]
return byte[]

PeekState() public method

Reads the current state from the port expander but does not fire any events. Call FetchState after all port expanders are polled (peeked) to fire the events.
public PeekState ( ) : void
return void

SetState() public method

public SetState ( byte state ) : void
state byte
return void