NERvDN Library
0.2.0.20160420-0019
NERvLibrary - Nerve Gear Developer Network
|
Nerve Gear data interface. More...
#include <NERvGear/interface/IData.h>
Nerve Gear data interface.
Define ID:
Public Member Functions | |
virtual long __stdcall | GetId (UID *id)=0 |
Retrieves the UID of this data object. More... | |
virtual size_t __stdcall | GetName (size_t len, wchar_t *name)=0 |
Retrieves the display name for this data. More... | |
virtual size_t __stdcall | GetDescrip (size_t len, wchar_t *descrip)=0 |
Retrieves the description for this data. More... | |
virtual long __stdcall | QuerySource (IDataSource **source)=0 |
Retrieves the source providing this data. More... | |
virtual unsigned __stdcall | GetValueCount ()=0 |
Retrieves the number of values providing by this data. | |
virtual size_t __stdcall | GetValue (unsigned index, size_t nbyte, void *buf)=0 |
Retrieves an current value of this data. More... | |
virtual size_t __stdcall | GetMaximum (unsigned index, size_t nbyte, void *buf)=0 |
Retrieves an maximum value of this data. More... | |
virtual size_t __stdcall | GetMinimum (unsigned index, size_t nbyte, void *buf)=0 |
Retrieves an minimum value of this data. More... | |
virtual unsigned __stdcall | GetValueIndex (int id)=0 |
Retrieves the index of a data value. More... | |
virtual int __stdcall | GetValueId (unsigned index)=0 |
Retrieves the ID of a data value. More... | |
virtual DATA::TYPE __stdcall | GetValueType (unsigned index)=0 |
Retrieves the data type of a data value. More... | |
virtual size_t __stdcall | GetValueUnit (unsigned index, size_t len, wchar_t *unit)=0 |
Retrieves the current unit of a data value. More... | |
virtual size_t __stdcall | GetValueName (unsigned index, size_t len, wchar_t *name)=0 |
Retrieves the display name for a data value. More... | |
virtual size_t __stdcall | GetValueDescrip (unsigned index, size_t len, wchar_t *descrip)=0 |
Retrieves the display name for a data value. More... | |
virtual unsigned __stdcall | GetUpdateInterval (unsigned index)=0 |
Retrieves the recommended update interval for a data value. More... | |
virtual long __stdcall | Update (unsigned index=-1, const wchar_t *param=0)=0 |
Update specified data values. More... | |
virtual long __stdcall | Invoke (unsigned index, const wchar_t *param=0, UI::IWindow *window=0)=0 |
Reserved function. More... | |
virtual size_t __stdcall | Config (unsigned index, DATA::CONFIG type, UI::IWindow *window, size_t len, wchar_t *param)=0 |
Retrieves the configuration string for specified data value. More... | |
virtual long __stdcall | SetValueUnit (unsigned index, const wchar_t *unit)=0 |
Specifies the unit for a data unit. More... | |
virtual size_t __stdcall | EnumValueUnit (unsigned index, size_t len, wchar_t *units)=0 |
Enumerates all units supported by a data value. More... | |
virtual long __stdcall | SetEventListener (IEventHandler *listener)=0 |
Sets an event listener receiving update events for this data object. More... | |
Public Member Functions inherited from NERvGear::IUnknown | |
virtual long __stdcall | QueryInterface (const UID &interfaceID, void **ppvObject)=0 |
virtual unsigned long __stdcall | AddRef ()=0 |
virtual unsigned long __stdcall | Release ()=0 |
|
pure virtual |
Retrieves the configuration string for specified data value.
The returned string could be used as the parameter for Update() or Invoke(), etc.
[in] | index | A zero based number represents the value to configure. |
[in] | type | Configuration type, one of the NERvGear::DATA::CONFIG enumeration values. |
[in] | window | Reserved, must be NULL. |
[in] | len | The size of param buffer, in characters. If param is NULL, this parameter must be 0. |
[out] | param | A pointer to a buffer that receives the null terminated string for the parameter, could be NULL. |
|
pure virtual |
Enumerates all units supported by a data value.
[in] | index | A zero based number represents the value to enumerate. |
[in] | len | The buffer size of units, in characters. If units is NULL, this parameter must be 0. |
[out] | units | A pointer to the buffer receiving a double-null-terminated string, could be NULL. |
|
pure virtual |
Retrieves the description for this data.
|
pure virtual |
Retrieves the UID of this data object.
[out] | id | Pointer to a UID, must not be NULL. |
S_OK | Success. |
E_INVALIDARG | Fail. The id is NULL. |
E_FAIL | Failed with unknown error. |
|
pure virtual |
Retrieves an maximum value of this data.
|
pure virtual |
Retrieves an minimum value of this data.
|
pure virtual |
Retrieves the display name for this data.
[in] | len | The size of name buffer, in characters. If name is NULL, this parameter must be 0. |
[out] | name | A pointer to a buffer that receives the null terminated string for the display name, could be NULL. |
|
pure virtual |
Retrieves the recommended update interval for a data value.
|
pure virtual |
Retrieves an current value of this data.
[in] | index | A zero based number represents the value to get. |
[in] | nbyte | The buffer size of buf, in bytes. If buf is NULL, this parameter must be 0. |
[out] | buf | A pointer to the buffer receiving a value, could be NULL. |
|
pure virtual |
Retrieves the display name for a data value.
|
pure virtual |
Retrieves the ID of a data value.
NVG_ANY | Fail. The index is invalid. |
|
pure virtual |
Retrieves the index of a data value.
[in] | id | A number represent a data value in public. |
NVG_ANY | Fail. The id is invalid. |
|
pure virtual |
Retrieves the display name for a data value.
|
pure virtual |
Retrieves the data type of a data value.
|
pure virtual |
Retrieves the current unit of a data value.
|
pure virtual |
Reserved function.
E_NOTIMPL. |
|
pure virtual |
Retrieves the source providing this data.
[out] | source | A pointer to a buffer receiving the IDataSource pointer. |
S_OK | Success. |
E_INVALIDARG | Fail. The source is NULL. |
E_FAIL | Failed with unknown error. |
|
pure virtual |
Sets an event listener receiving update events for this data object.
If the data object supports auto or asynchronous update, the event handler will receive EVT::DATAUPDATE when a value is updated.
[in] | listener | A pointer to the event handler that receives update events. |
S_OK | Success. |
E_INVALIDARG | Fail. The listener is NULL. |
E_NOTIMPL | Fail, It's not implemented by this data object. |
E_FAIL | Failed with unknown error. |
|
pure virtual |
Specifies the unit for a data unit.
[in] | index | A zero based number represents the value to set unit. |
[in] | unit | A pointer to the null terminated string returned by EnumValueUnit(). |
S_OK | Success. |
E_INVALIDARG | Fail. The index is invalid or value does not exists, or unit is NULL or invalid. |
E_FAIL | Fail. Specified value does not have unit, or failed to switch to specified unit. |
|
pure virtual |
Update specified data values.
[in] | index | A zero based number represents the value to update, NVG_ANY means updating all values. |
[in] | param | A pointer to the null terminated string as update parameter. |
S_OK | Success. |
E_PENDING | If event listener is set, the event handler will receive an EVT::DATAUPDATE event when value is updated. If event listener is not set, the values will be updated at undefined time. |
E_INVALIDARG | Fail. The index is invalid or value does not exists. |
E_FAIL | Failed with unknown error. |