CVB++ 15.0
Loading...
Searching...
No Matches
CVTypesGenApi.h
1// ---------------------------------------------------------------------------
2// Common Vision Blox - (C) STEMMER IMAGING
3// ---------------------------------------------------------------------------
4// This software is supplied under the terms of a license agreement or
5// nondisclosure agreement with STEMMER IMAGING and may not be copied or
6// disclosed except in accordance with the terms of that agreement.
7// ---------------------------------------------------------------------------
8
9#pragma once
10
11#include "CVTypes.h"
12
13// GenApi object types
14// ---------------------------------------------------------------------------
15typedef void* NODEMAP; // GenApi INodeMap object.
16typedef void* NODE; // GenApi INode object.
17typedef void* FWUPDATER; // GenApi IFirmwareUpdater object.
18
19// GenApi callback handle
20// ---------------------------------------------------------------------------
21typedef void* NODECALLBACK;
22
23// Callback to notify on a change in a node
24typedef void(__stdcall* TFNode)(NODE Node, void* pPrivate);
25// Callback for NODE processing (e.g. load and save)
26typedef cvbbool_t(__stdcall* TFNodeProc)(NODE Node, cvbres_t Reason, void* pPrivate);
27// Callback for device reset during/after firmware update
28typedef cvbbool_t (__stdcall *TFDeviceReset)(unsigned int EstimatedUpdateDurationMs, unsigned int DiscoverDurationMs, NODEMAP& NodeMap, void *pPrivate);
29
30// Simple and complex GenApi types
31// ---------------------------------------------------------------------------
34enum TAccessMode
35{
36 AM_NI = 0, // Not Implemented
37 AM_NA, // Not Available
38 AM_RO, // Read Only
39 AM_WO, // Write Only
40 AM_RW // Readable and Writable
41};
42
48enum TVisibility
49{
50 NV_Beginner = 0, // Visible for beginners
51 NV_Expert, // Visible for experts
52 NV_Guru, // Visible for gurus
53 NV_Invisible = -1 // Not visible at all
54};
55
58enum TNumberRepresentation
59{
60 NR_Undefined = -1, // Not set in XML (treated as linear)
61 NR_Linear, // Slider with linear behavior
62 NR_Logarithmic, // Slider with logarithmic behavior
63 NR_Boolean, // True/False representation
64 NR_PureNumber, // Decimal number in an edit control
65 NR_HexNumber, // Hex number in an edit control
66 NR_IPv4, // IPv4 address in an edit control
67 NR_MAC // MAC address in an edit control
68};
69
72enum TCachingMode
73{
74 CM_NoCache = 0, // No caching used
75 CM_WriteThrough, // Write to cache and register
76 CM_WriteAround // Write to register, cache written on next read
77};
78
81enum TNodeType
82{
83 NT_Invalid = -1, // Not a valid node object
84 NT_Unknown = 0, // Unknown or unsupported node
85 NT_Boolean, // IBoolean node
86 NT_Category, // ICategory node (no get/set)
87 NT_Command, // ICommand node (get/set as boolean)
88 NT_Enumeration, // IEnumeration node
89 NT_EnumEntry, // IEnumEntry node
90 NT_Float, // IFloat node
91 NT_Integer, // IInteger node
92 NT_String, // IString node
93 NT_Port, // IPort node
94 NT_Node, // Generic INode node
95 NT_Register, // IRegister node
96 NT_Last
97};
98
103enum TNodeMapInfo
104{
105 NMI_Vendor = 0, // Gets the vendor name of XML provider
106 NMI_Model, // Gets the model name of XML provider
107 NMI_SchemaVersionMajor, // Gets the schema major version number
108 NMI_SchemaVersionMinor, // Gets the schema minor version number
109 NMI_SchemaVersionSubMinor, // Gets the schema sub-minor version number
110 NMI_DeviceVersionMajor, // Gets the device major version number
111 NMI_DeviceVersionMinor, // Gets the device minor version number
112 NMI_DeviceVersionSubMinor, // Gets the device sub-minor version number
113 NMI_Namespace, // Gets the description namespace (e.g. GEV)
114 NMI_ProductGUID, // Gets the product GUID
115 NMI_VersionGUID, // Gets the version GUID
116 NMI_Tooltip, // Gets the XML description tool tip
117 NMI_Last
118};
119
122enum TNodeInfo
123{
124 NI_Name = 0, // Gets the full name of the node
125 NI_DisplayName, // Gets the display name of the node
126 NI_AccessMode, // Gets the TAccessMode of the node
127 NI_Max, // Gets the maximal value
128 NI_Min, // Gets the minimal value
129 NI_Increment, // Gets the increment
130 NI_NumEnumEntries, // Gets the number of entries for NInfoEnum
131 NI_Streamable, // Gets whether this node can be saved
132 NI_CachingMode, // Gets the caching mode
133 NI_Tooltip, // Gets the tooltip (short description)
134 NI_Description, // Gets the long descriptive text
135 NI_Visibility, // Gets the visibility level
136 NI_PollingTime, // Gets the polling time in ms
137 NI_EventID, // Gets the event ID if available
138 NI_RegisterAddress, // Gets the address of a register node
139 NI_RegisterLength, // Gets the length of a register node in bytes
140 NI_Representation, // Gets the number representation if applicable
141 NI_Unit, // Gets the unit of float nodes as a string
142 NI_AliasName, // Gets the full name of an alias node (empty for none)
143 NI_Deprecated, // Gets whether this node has been deprecated
144 NI_Feature, // Gets whether this is a public feature node
145 NI_Last
146};
147
150enum TNodeList
151{
152 NL_ChildNode = 0, // Child nodes
153 NL_Selected, // Selected (indexed) nodes
154 NL_EnumEntry, // Enumeration entries
155 NL_Selecting, // Nodes selecting this node
156 NL_Last
157};
158
164enum TVerifyMode
165{
166 VM_NO = 0, // Reads and writes are not validated
167 VM_WO, // Default: Only writes are validated
168 VM_RO, // Only reads are validated
169 VM_RW, // Reads and writes are validated
170 VM_Last
171};
172
178enum TFirmwareUpdateInfo
179{
180 FWUI_Key = 0, // Gets the key name for a given index
181 FWUI_Value, // Gets the value for an info key name
182 FWUI_LanguageCode // Gets the language code for the given update info number
183};