CVB.Net 14.0
NodeExtensions Class Reference

Extension methods for register implementation. More...

Static Public Member Functions

static long GetAddress (this ValueNode node)
 Reads the register address from the given node . More...
 
static long GetLength (this ValueNode node)
 Gets the register length in bytes from the given node . More...
 
static AccessMode GetAccessMode (ValueNode node)
 Gets the access mode from the given node . More...
 
static void SetAccessMode (this ValueNode node, AccessMode value)
 Sets the access mode on the given node . More...
 
static CacheMode GetCacheMode (ValueNode node)
 Gets the current cache mode of the given register node . More...
 
static void SetCacheMode (this ValueNode node, CacheMode value)
 Sets the cache mode on the given node . More...
 
static TimeSpan GetPollingTime (ValueNode node)
 Gets the polling time on the given node . More...
 
static void SetPollingTime (this ValueNode node, TimeSpan value)
 Sets the polling time on the given node . More...
 
static AccessMode GetAccessModeOn< TNode, TValue > (this IHasValueConfig< TNode, TValue > node)
 Gets the access mode on the given node . More...
 
static CacheMode GetCacheModeOn< TNode, TValue > (this IHasValueConfig< TNode, TValue > node)
 Gets the cache mode on the given node . More...
 
static TimeSpan GetPollingTimeOn< TNode, TValue > (this IHasValueConfig< TNode, TValue > node)
 Gets the polling time on the given node . More...
 

Detailed Description

Extension methods for register implementation.

Member Function Documentation

◆ GetAccessMode()

static AccessMode GetAccessMode ( ValueNode  node)
static

Gets the access mode from the given node .

Parameters
nodeNode to get the access mode from.
Returns
The current access mode.

◆ GetAccessModeOn< TNode, TValue >()

static AccessMode GetAccessModeOn< TNode, TValue > ( this IHasValueConfig< TNode, TValue >  node)
static

Gets the access mode on the given node .

The value configuration is followed until a register has been found and from that the access mode is returned.

If no register node is found, AccessMode.RW is returned.

Parameters
nodeThe node to start query on.
Returns
The access mode.
Type Constraints
TNode :ValueNode 

◆ GetAddress()

static long GetAddress ( this ValueNode  node)
static

Reads the register address from the given node .

Parameters
nodeNode to get value from.
Returns
Register address.

◆ GetCacheMode()

static CacheMode GetCacheMode ( ValueNode  node)
static

Gets the current cache mode of the given register node .

Parameters
nodeRegister node to get cache mode from.
Returns
The current cache mode.

◆ GetCacheModeOn< TNode, TValue >()

static CacheMode GetCacheModeOn< TNode, TValue > ( this IHasValueConfig< TNode, TValue >  node)
static

Gets the cache mode on the given node .

The value configuration is followed until a register has been found and from that the access mode is returned.

If no register node is found, CacheMode.NoCache is returned.

Parameters
nodeThe node to start query on.
Returns
Cache mode.
Type Constraints
TNode :ValueNode 

◆ GetLength()

static long GetLength ( this ValueNode  node)
static

Gets the register length in bytes from the given node .

Parameters
nodeNode to get value from.
Returns
Register value length in bytes.

◆ GetPollingTime()

static TimeSpan GetPollingTime ( ValueNode  node)
static

Gets the polling time on the given node .

Parameters
nodeNode to get polling time from.
Returns
The current polling time.

◆ GetPollingTimeOn< TNode, TValue >()

static TimeSpan GetPollingTimeOn< TNode, TValue > ( this IHasValueConfig< TNode, TValue >  node)
static

Gets the polling time on the given node .

The value configuration is followed until a register has been found and from that the access mode is returned.

If no register node is found, TimeSpan.Zero is returned.

Parameters
nodeThe node to start query on.
Returns
Polling time.
Type Constraints
TNode :ValueNode 

◆ SetAccessMode()

static void SetAccessMode ( this ValueNode  node,
AccessMode  value 
)
static

Sets the access mode on the given node .

Parameters
nodeNode to set the access mode on.
valueNew access mode to set.

◆ SetCacheMode()

static void SetCacheMode ( this ValueNode  node,
CacheMode  value 
)
static

Sets the cache mode on the given node .

Parameters
nodeNode to set the cache mode on.
valueNew cache mode to set.

◆ SetPollingTime()

static void SetPollingTime ( this ValueNode  node,
TimeSpan  value 
)
static

Sets the polling time on the given node .

Parameters
nodeNode to set polling time on.
valueNew time span for polling time.