FSUIPC Client DLL
.NET interface for FSUIPC
Offset Class Reference

Represents an item of data that can be read from or written to an FSUIPC offset. More...

Inherited by Offset< T >.

Public Member Functions

 Offset (int Address, int Length)
 Creates a Offset that will read from or write the specified number of bytes to the specified Offset.
 
 Offset (int Address, int Length, bool WriteOnly)
 Creates a new Offset that will read from or write the specified number of bytes to the specified Offset.
 
 Offset (string DataGroupName, int Address, int Length)
 Creates a new Offset that will read from or write the specified number of bytes to the specified Offset.
 
 Offset (string DataGroupName, int Address, int Length, bool WriteOnly)
 Creates a new Offset in the specified group that will read from or write the specified number of bytes to the specified Offset.
 
void Disconnect ()
 Immediately disconnects this Offset from FSUIPC. The value of this Offset will no longer be updated or written during Process() calls. Use Reconnect() to start updating again.
 
void Disconnect (bool AfterNextProcess)
 Disconnects this Offset from the FSUIPCConnection class. The value of this Offset will no longer be updated or written during Process() calls. Use Reconnect() to start updating again.
 
void Reconnect ()
 Permanently reconnects this Offset to FSUIPC. The value of this Offset will be read/written during subsequent Process() calls.
 
void Reconnect (bool ForNextProcessOnly)
 Reconnects this Offset to FSUIPC. The value of this Offset will be updated/written during subsequent Process() calls.
 
GetValue< T > ()
 Gets the value of this offset as the specified type.
 
object GetValue (Type AsType)
 Gets the value of this offset as the specified type.
 
virtual void SetValue (object NewValue)
 Sets the value of this offset. No type checking or other data verification is done.
 
override string ToString ()
 Return a string value containing information about this Offset.
 

Properties

int Address [get, set]
 The FSUIPC offset address to read from or write to, as specified in the FSUIPC for Programmer's document.
 
OffsetAction ActionAtNextProcess [get, set]
 This property can be used to force this offset to be read or written on the next process.
 
bool IsConnected [get]
 Indicates if this Offset is currently 'Connected'. Offsets that are disconnected will not be updated or have changes written to FSUIPC when Process() is run. This is read-only. To connect or disconnect an Offset call the Connect() or Disconnect() methods.
 
bool WriteOnly [get, set]
 Indicates that this Offset is to be Write-Only. While marked as Write-Only the value of this Offset will never be read from FSUIPC. If you change the value of this Offset the new value will be written to FSUIPC on the next process.
 
bool IsFixedLengthString [get, set]
 True is this offset represents a fixed length string.
 
bool ValueChanged [get]
 Indicates if the value of this Offset was changed during the last Process() call.
 
int DataLength [get]
 The length of the data in this offset in bytes.
 
Guid ID [get]
 The unique internal ID of this offset.
 

Detailed Description

Represents an item of data that can be read from or written to an FSUIPC offset.

Constructor & Destructor Documentation

◆ Offset() [1/4]

Offset ( int Address,
int Length )
inline

Creates a Offset that will read from or write the specified number of bytes to the specified Offset.

Parameters
AddressThe FSUIPC offset address to read from or write to, as specified in the FSUIPC for Programmer's document.
LengthThe number of bytes to read/write.

◆ Offset() [2/4]

Offset ( int Address,
int Length,
bool WriteOnly )
inline

Creates a new Offset that will read from or write the specified number of bytes to the specified Offset.

Parameters
AddressThe FSUIPC offset address to read from or write to, as specified in the FSUIPC for Programmer's document.
LengthThe number of bytes to read/write.
WriteOnlyIf true, Sets this Offset to only write data. Its value is never read from FSUIPC. You can change the setting with the WriteOnly property at any time.

◆ Offset() [3/4]

Offset ( string DataGroupName,
int Address,
int Length )
inline

Creates a new Offset that will read from or write the specified number of bytes to the specified Offset.

Parameters
DataGroupNameThe name of the DataGroup to put this Offset into.

To process this Offset you must call Process() and pass the GroupName as a parameter.

Parameters
AddressThe FSUIPC offset address to read from or write to, as specified in the FSUIPC for Programmer's document.
LengthThe number of bytes to read/write.

◆ Offset() [4/4]

Offset ( string DataGroupName,
int Address,
int Length,
bool WriteOnly )
inline

Creates a new Offset in the specified group that will read from or write the specified number of bytes to the specified Offset.

Parameters
DataGroupNameThe name of the DataGroup to put this Offset into.

To process this Offset you must call Process() and pass the GroupName as a parameter.

Parameters
AddressThe FSUIPC offset address to read from or write to, as specified in the FSUIPC for Programmer's document.
LengthThe number of bytes to read/write.
WriteOnlyIf true, Sets this Offset to only write data. Its value is never read from FSUIPC. You can change the setting with the WriteOnly property at any time.

Member Function Documentation

◆ Disconnect()

void Disconnect ( bool AfterNextProcess)
inline

Disconnects this Offset from the FSUIPCConnection class. The value of this Offset will no longer be updated or written during Process() calls. Use Reconnect() to start updating again.

Parameters
AfterNextProcessIf true, the Offset will not be disconnected until after you call Process(). If false the Offset is disconnected immediately.

◆ GetValue()

object GetValue ( Type AsType)
inline

Gets the value of this offset as the specified type.

Parameters
AsTypeThe type the value should be returned as
Returns
The value of the offset

◆ GetValue< T >()

T GetValue< T > ( )
inline

Gets the value of this offset as the specified type.

Template Parameters
TThe type the value should be returned as
Returns
The value of the offset

◆ Reconnect()

void Reconnect ( bool ForNextProcessOnly)
inline

Reconnects this Offset to FSUIPC. The value of this Offset will be updated/written during subsequent Process() calls.

Parameters
ForNextProcessOnlyIf true, the Offset is reconnected only for the next Process() call. After that it's disconnected again. If false, the Offset is reconnected until you call Disconnect().

◆ SetValue()

virtual void SetValue ( object NewValue)
inlinevirtual

Sets the value of this offset. No type checking or other data verification is done.

Parameters
NewValue

Reimplemented in Offset< T >.

◆ ToString()

override string ToString ( )
inline

Return a string value containing information about this Offset.

Returns
A string containing the Offset Address and Length

Property Documentation

◆ ActionAtNextProcess

OffsetAction ActionAtNextProcess
getset

This property can be used to force this offset to be read or written on the next process.

Normally you need not set this as the default (AutoSense) works perfectly well.