ProviewR Programmer's Reference Manual  V6.1.4
rt_gdh.h
Go to the documentation of this file.
1 /*
2  * ProviewR Open Source Process Control.
3  * Copyright (C) 2005-2025 SSAB EMEA AB.
4  *
5  * This file is part of ProviewR.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation, either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with ProviewR. If not, see <http://www.gnu.org/licenses/>
19  *
20  * Linking ProviewR statically or dynamically with other modules is
21  * making a combined work based on ProviewR. Thus, the terms and
22  * conditions of the GNU General Public License cover the whole
23  * combination.
24  *
25  * In addition, as a special exception, the copyright holders of
26  * ProviewR give you permission to, from the build function in the
27  * ProviewR Configurator, combine ProviewR with modules generated by the
28  * ProviewR PLC Editor to a PLC program, regardless of the license
29  * terms of these modules. You may copy and distribute the resulting
30  * combined work under the terms of your choice, provided that every
31  * copy of the combined work is accompanied by a complete copy of
32  * the source code of ProviewR (the version used to produce the
33  * combined work), being distributed under the terms of the GNU
34  * General Public License plus this exception.
35  */
36 
37 #ifndef rt_gdh_h
38 #define rt_gdh_h
39 
40 /* rt_gdh.h
41  This include file defines the global datastructures and
42  data entities in GDH. Also, the GDH entry points are defined. */
43 
44 #if defined __cplusplus
45 extern "C" {
46 #endif
47 
52 /*
53  *@example gdh_examples.c
54  */
55 
59 #include "rt_errh.h"
60 
61 typedef pwr_tSubid gdh_tSubid;
62 typedef pwr_tSubid SUBID;
63 typedef pwr_tDlid gdh_tDlid;
64 typedef pwr_tDlid DLID;
65 
73 typedef struct {
75  void* adrs;
76  unsigned int bufsize;
77 } gdh_sObjRef;
78 
80 
84 typedef enum {
90 
94 typedef struct {
97  char nodename[32];
103  pwr_tTime timeup;
104  pwr_tTime timedown;
106 } gdh_sNodeInfo;
107 
111 typedef struct {
115  pwr_tTime time;
116  char name[32];
121 
125 typedef struct {
126  pwr_eEditor Editor;
127  pwr_mClassDef Flags;
128  pwr_eMethod Method;
129  pwr_ePopEditorEnum PopEditor;
131 
135 typedef enum {
137  gdh_mAttrDef_Super = 1 << 1
139 
143 typedef struct {
145  unsigned long attrLevel;
146  pwr_eClass attrClass;
147  unsigned long flags;
148  pwr_uParDef* attr;
150 } gdh_sAttrDef;
151 
155 typedef struct {
157  pwr_sValue* Value;
159 } gdh_sValueDef;
160 
164 typedef struct {
166  pwr_sBit* Bit;
168 } gdh_sBitDef;
169 
172 /* GDH entrypoints (as function prototypes). */
173 
179 #define gdh_ClassNameToNumber gdh_ClassNameToId
180 
182  pwr_sAttrRef* arp, const char* aname, pwr_sAttrRef* oarp);
183 
185 
187 
188 pwr_tStatus gdh_AttrrefToName(pwr_sAttrRef* attributeReference,
189  char* nameBuffer, unsigned int sizeOfNameBuffer, pwr_tBitMask nameType);
190 
192 
193 pwr_tStatus gdh_AttrStringToValue(int type_id, char* value_str,
194  void* buffer_ptr, int buff_size, int attr_size);
195 
196 pwr_tStatus gdh_AttrValueToString(pwr_eType type_id, pwr_tTid tid,
197  void* value_ptr, char* str, int size, int* len, char* format);
198 
200  pwr_sAttrRef* attributeReference, char* nameBuffer, int sizeOfNameBuffer);
201 
203  const char* attributeName, pwr_sAttrRef* attributeReference);
204 
205 pwr_tStatus gdh_ClassNameToId(const char* className, pwr_tClassId* classid);
206 
207 pwr_tStatus gdh_CreateObject(char* objectName, pwr_tClassId classid,
208  unsigned int sizeOfObjectData, pwr_tObjid* objectId, pwr_tObjid internal1,
209  pwr_tBitMask internal2, pwr_tObjid internal3);
210 
212 
214 
216  pwr_sAttrRef* addressOfAttributeReference, void** objectData,
217  pwr_tDlid* directLinkId);
218 
220 
221 void gdh_DLUnrefObjectInfoAll(void);
222 
223 pwr_tStatus gdh_FReadObject(char* filename, pwr_tAttrRef* arp);
224 
225 pwr_tStatus gdh_FWriteObjectR(
226  FILE* fp, char* ap, char* aname, pwr_tAttrRef* arp, pwr_tCid cid);
227 
228 pwr_tStatus gdh_FWriteObject(char* filename, pwr_tAttrRef* arp);
229 
231  pwr_tUInt32* maxAlarmLevel, pwr_tUInt32* alarmBlockLevel,
232  pwr_tUInt32* maxAlarmBlockLevel, pwr_tUInt32* alarmVisibility);
233 
235  pwr_tTypeId* attributeType, unsigned int* attributeSize,
236  unsigned int* attributeOffset, unsigned int* attributeDimension);
237 
238 pwr_tStatus gdh_GetAttributeFlags(pwr_sAttrRef* arp, unsigned int* flags);
239 
241  pwr_tUInt32* size, pwr_tUInt32* offs, pwr_tUInt32* elem);
242 
244 
245 pwr_tStatus gdh_GetChild(pwr_tObjid object, pwr_tObjid* firstChild);
246 
248 
250 
252  pwr_tObjid oid, char* name, pwr_tUInt32* size);
253 
255 
257 
258 pwr_tStatus gdh_GetMaskBitDef(pwr_tTid tid, gdh_sBitDef** bd, int* rows);
259 
261  pwr_tClassId cid, pwr_sAttrRef* arp, pwr_sAttrRef* new_arp);
262 
264 
266  pwr_tClassId cid,
267  pwr_sAttrRef* arp,
268  pwr_sAttrRef* new_arp
269  );
270 
272 
274 
276 
278 
280 
282 
284 
286  pwr_tOid oid,
287  pwr_sAttrRef* arp
288  );
289 
291 
293  const char* name, pwr_tAddress bufp, pwr_tUInt32 bufsize);
294 
296  pwr_sAttrRef* attributeReference, void* buffer, unsigned int sizeOfBuffer);
297 
299 
301 
303 
305 
307  pwr_tObjid object, pwr_tObjid* previousObject);
308 
310  pwr_tObjid object, pwr_tObjid* previousSibling);
311 
313 
314 pwr_tStatus gdh_GetSecurityInfo(pwr_sSecurity* security);
315 
317 
319 
321 
322 pwr_tStatus gdh_SearchFile(pwr_tOid oid, char* dir, char* pattern,
323  pwr_tString40* filelist[], int* filecnt);
324 
326  pwr_tTime* lastUpdate, pwr_tStatus* lastStatus);
327 
329 
330 pwr_tStatus gdh_Init(const char* name);
331 
333 
334 pwr_tStatus gdh_MountObjidToPointer(pwr_tObjid object, void** objectData);
335 
336 pwr_tStatus gdh_MoveObject(pwr_tObjid objectId, pwr_tObjid newParentId);
337 
338 pwr_tStatus gdh_NameToAttrref(pwr_tObjid parent, const char* attributeName,
339  pwr_sAttrRef* attributeReference);
340 
341 pwr_tStatus gdh_NameToObjid(const char* objectName, pwr_tObjid* objid);
342 
343 pwr_tStatus gdh_NameToPointer(const char* objectName, void** objectData);
344 
346 
348  pwr_tObjid oid, char* namebuf, pwr_tUInt32 size, pwr_tBitMask nametype);
349 
350 pwr_tStatus gdh_ObjidToPointer(pwr_tObjid object, void** objectData);
351 
352 pwr_tStatus gdh_RefObjectInfo(char* attributeName, void** objectData,
353  pwr_tSubid* subid, unsigned int sizeOfObjectData);
354 
356  unsigned int nEntry, gdh_sObjRef* objectReference, pwr_tSubid* subid);
357 
358 pwr_tStatus gdh_RenameObject(pwr_tObjid objectId, char* newObjectName);
359 
361  pwr_tObjid object, pwr_tUInt32 alarmBlockLevel);
362 
364 
366  const char* attributeName, void* buffer, unsigned int sizeOfBuffer);
367 
369  pwr_sAttrRef* attributeReference, void* buffer, unsigned int sizeOfBuffer);
370 
372  pwr_tSubid subid, void** buffer, unsigned int sizeOfBuffer);
373 
375  pwr_tSubid subid, void* buffer, unsigned int sizeOfBuffer);
376 
378  pwr_sAttrRef* attributeReference, pwr_tSubid* subid);
379 
380 pwr_tStatus gdh_SubRefObjectInfoList(unsigned int entryCount, void* object[],
381  pwr_tBoolean isAttrref[], pwr_tSubid subid[]);
382 
383 pwr_tStatus gdh_SubRefObjectInfoName(char* attributeName, pwr_tSubid* subid);
384 
385 pwr_tStatus gdh_SubSize(pwr_tSubid subid, unsigned int* size);
386 
388  pwr_tInt32 defaultUpdateTime, pwr_tInt32 defaultTimeOut);
389 
391 
392 void gdh_SubUnrefObjectInfoAll(void);
393 
394 pwr_tStatus gdh_SubUnrefObjectInfoList(unsigned int nEntry, pwr_tSubid* subid);
395 
397 
399 
400 pwr_tStatus gdh_VolumeIdToName(pwr_tVid vid, char* name, int size);
401 
402 /*
403  * Translation between Rtdb reference and job context virtual address formats.
404  */
405 
406 void gdh_StoreRtdbPointer(unsigned long* rtdbReference, void* virtualAddress);
407 
408 void* gdh_TranslateRtdbPointer(unsigned long rtdbReference);
409 
410 pwr_tStatus gdh_GetObjectBodyDef(
411  pwr_tCid cid, gdh_sAttrDef** bodydef, int* rows, pwr_tOid oid);
412 
413 /* Thread safe functions for times and strings */
414 void gdh_GetTimeDL(pwr_tTime* atp, pwr_tTime* time);
415 void gdh_SetTimeDL(pwr_tTime* atp, pwr_tTime* time);
418 void gdh_GetStrDL(char* sp, char* str, int size);
419 void gdh_SetStrDL(char* sp, const char* str, int size);
420 pwr_tStatus gdh_GetObjectInfoTime(const char* name, pwr_tTime* time);
421 pwr_tStatus gdh_SetObjectInfoTime(const char* name, pwr_tTime* time);
422 pwr_tStatus gdh_GetObjectInfoDeltaTime(const char* name, pwr_tDeltaTime* time);
423 pwr_tStatus gdh_SetObjectInfoDeltaTime(const char* name, pwr_tDeltaTime* time);
424 pwr_tStatus gdh_GetObjectInfoStr(const char* name, char* str, int size);
425 pwr_tStatus gdh_SetObjectInfoStr(const char* name, const char* str, int size);
428 void gdh_InitialLoadDone(pwr_tObjid systemobject, pwr_tObjid nodeobject);
429 
430 pwr_tStatus gdh_IsAlias(pwr_tObjid object, pwr_tBoolean* isAlias);
431 
432 pwr_tStatus gdh_IsMountClean(pwr_tObjid object, pwr_tBoolean* isMountClean);
433 
434 /*
435  * Exclusive mode
436  */
437 
438 void gdh_ExclusiveModeOn(void);
439 
440 void gdh_ExclusiveModeOff(void);
441 
442 pwr_tStatus gdh_GetTrueObjectBodyDef(
443  pwr_tCid cid, gdh_sAttrDef** bodydef, int* rows);
444 
445 pwr_tStatus gdh_GetAttrRefAdef(pwr_sAttrRef* arp, gdh_sAttrDef* attrdef);
446 
447 pwr_tStatus gdh_SetObjectReadOnly(pwr_tOid oid);
448 
449 /* Undocumented functions. For internal use only. */
450 
451 pwr_tStatus gdh_MDAttribute(pwr_tClassId classid,
452  pwr_sAttrRef* attributeReference, char* attributeName,
453  pwr_tTypeId* attributeType, unsigned int* attributeSize,
454  unsigned int* attributeOffset, unsigned int* attributeDimension);
455 
456 pwr_tStatus gdh_SetCache(
457  pwr_tUInt32 activation_level, pwr_tUInt32 trimmed_level);
458 
459 void gdh_RegisterLogFunction(void (*func)(char*, void*, unsigned int));
460 
461 pwr_tStatus gdh_GetSubClassList(pwr_tCid cid, pwr_tCid* subcid);
462 
463 pwr_tStatus gdh_GetNextSubClass(
464  pwr_tCid cid, pwr_tCid psubcid, pwr_tCid* subcid);
465 
466 pwr_tStatus gdh_GetGlobalClassList(int cidcnt, pwr_tCid* cid, int attrobjects,
467  pwr_tAttrRef* classlist[], int* listcnt);
468 
469 pwr_tStatus gdh_GetLocalClassList(int cidcnt, pwr_tCid* cid, int attrobjects,
470  pwr_tAttrRef* classlist[], int* listcnt);
471 
472 pwr_tStatus gdh_CheckLocalObject(pwr_tOid oid);
473 pwr_tStatus gdh_TidToType(pwr_tTid tid, pwr_eType *type);
474 pwr_tStatus gdh_MountDynClients(void);
475 
478 #if defined __cplusplus
479 }
480 #endif
481 #endif
gdh_mAttrDef
Definition: rt_gdh.h:135
gdh_eLinkState
Definition: rt_gdh.h:84
@ gdh_mAttrDef_Shadowed
Definition: rt_gdh.h:136
@ gdh_mAttrDef_Super
Definition: rt_gdh.h:137
@ gdh_eLinkState_Down
Definition: rt_gdh.h:85
@ gdh_eLinkState_Astrt
Definition: rt_gdh.h:87
@ gdh_eLinkState_Up
Definition: rt_gdh.h:88
@ gdh_eLinkState_Istrt
Definition: rt_gdh.h:86
pwr_tStatus gdh_SubAssociateBuffer(pwr_tSubid subid, void **buffer, unsigned int sizeOfBuffer)
Associate a buffer with the subscription.
Definition: rt_gdh.c:3186
pwr_tStatus gdh_GetNextSibling(pwr_tObjid object, pwr_tObjid *nextSibling)
Get the object identity of the next sibling (i.e. the next object with the same parent).
Definition: rt_gdh.c:1465
pwr_tStatus gdh_SubRefObjectInfoList(unsigned int entryCount, void *object[], pwr_tBoolean isAttrref[], pwr_tSubid subid[])
Sets up a list of subscriptions to an object/attribute.
Definition: rt_gdh.c:2844
pwr_tStatus gdh_GetObjectDLCount(pwr_tObjid object, pwr_tUInt32 *count)
Gets the direct link count of an object.
Definition: rt_gdh.c:1251
pwr_tStatus gdh_SetObjectInfoStr(const char *name, const char *str, int size)
Store a string value in an attribute. Sets the string lock to ensure that the string is not modified ...
Definition: rt_gdh.c:5612
pwr_tStatus gdh_MountObjidToPointer(pwr_tObjid object, void **objectData)
Get a pointer to a mount object.
Definition: rt_gdh.c:2464
pwr_tStatus gdh_GetClassList(pwr_tClassId classid, pwr_tObjid *object)
Get the object identity of the first object in the list of objects of a specified class.
Definition: rt_gdh.c:1627
pwr_tBoolean gdh_IsInitialized()
Check if gdh is initialized. Returns TRUE if gdh is initialized, else FALSE.
Definition: rt_gdh.c:5661
pwr_tStatus gdh_NameToAttrref(pwr_tObjid parent, const char *attributeName, pwr_sAttrRef *attributeReference)
Converts from name string to attribute reference.
Definition: rt_gdh.c:2314
pwr_tStatus gdh_ClassAttrToAttrref(pwr_tClassId classid, const char *attributeName, pwr_sAttrRef *attributeReference)
Converts a class and attribute string to attrref format.
Definition: rt_gdh.c:319
pwr_tStatus gdh_GetEnumValueDef(pwr_tTid tid, gdh_sValueDef **vd, int *rows)
Get definition information for an enumeration type.
Definition: rt_gdh.c:4117
pwr_tStatus gdh_ArefANameToAref(pwr_sAttrRef *arp, const char *aname, pwr_sAttrRef *oarp)
Get the attribute reference for an attribute in an object attribute reference, where the attribute is...
Definition: rt_gdh.c:192
pwr_tStatus gdh_GetObjectInfoAttrref(pwr_sAttrRef *attributeReference, void *buffer, unsigned int sizeOfBuffer)
Fetch the data of an attribute or a whole object body.
Definition: rt_gdh.c:916
pwr_tStatus gdh_GetObjectInfoStr(const char *name, char *str, int size)
Fetch a string value from an attribute. Sets the string lock to ensure that the string is not modifie...
Definition: rt_gdh.c:5590
pwr_tStatus gdh_NethandlerRunning(void)
Check if the Nethandler has started.
Definition: rt_gdh.c:2284
pwr_tStatus gdh_DeleteObjectTree(pwr_tObjid objectId)
Remove a local object tree.
Definition: rt_gdh.c:548
pwr_tStatus gdh_GetMaskBitDef(pwr_tTid tid, gdh_sBitDef **bd, int *rows)
Get definition information for a mask type.
Definition: rt_gdh.c:4203
pwr_tStatus gdh_GetParent(pwr_tObjid object, pwr_tObjid *parent)
Get the object identity of the parent of an object.
Definition: rt_gdh.c:1281
pwr_tStatus gdh_FReadObject(char *filename, pwr_tAttrRef *arp)
Read a textfile into an object.
Definition: rt_gdh.c:4459
pwr_tStatus gdh_GetClassListAttrRef(pwr_tClassId cid, pwr_sAttrRef *arp)
Get the attribute reference of the first object in the list of objects of a specified class....
Definition: rt_gdh.c:1712
void gdh_SetDeltaTimeDL(pwr_tDeltaTime *dtp, pwr_tDeltaTime *time)
Thread save function to store a direct linked delta time value. Sets the time lock to ensure that the...
Definition: rt_gdh.c:5453
pwr_tStatus gdh_GetNextObject(pwr_tObjid object, pwr_tObjid *nextObject)
Get the object identity of the next object in the list of objects of a certain class.
Definition: rt_gdh.c:1659
pwr_tStatus gdh_ArefDisabled(pwr_sAttrRef *arp, pwr_tDisableAttr *disabled)
Check if an attribute is disabled.
Definition: rt_gdh.c:4283
pwr_tStatus gdh_MoveObject(pwr_tObjid objectId, pwr_tObjid newParentId)
Move a local object.
Definition: rt_gdh.c:2162
pwr_tStatus gdh_GetClassInfo(pwr_tCid cid, gdh_sClassInfo *info)
Get class info. Returns information from $ClassDef object.
Definition: rt_gdh.c:5631
void gdh_DLUnrefObjectInfoAll(void)
Removes all direct links set up by this process.
Definition: rt_gdh.c:656
pwr_tStatus gdh_GetObjectInfo(const char *name, pwr_tAddress bufp, pwr_tUInt32 bufsize)
Fetch data from an object or an attribute.
Definition: rt_gdh.c:789
void gdh_GetTimeDL(pwr_tTime *atp, pwr_tTime *time)
Thread save function to fetch a direct linked absolute time value. Sets the time lock to ensure that ...
Definition: rt_gdh.c:5397
pwr_tStatus gdh_SetAlarmLevel(pwr_tObjid object, pwr_tUInt32 alarmLevel)
This routine sets the alarm level for a certain object.
Definition: rt_gdh.c:3514
void gdh_SetTimeDL(pwr_tTime *atp, pwr_tTime *time)
Thread save function to store a direct linked absolute time value. Sets the time lock to ensure that ...
Definition: rt_gdh.c:5413
pwr_tStatus gdh_ClassAttrrefToAttr(pwr_tClassId classid, pwr_sAttrRef *attributeReference, char *nameBuffer, int sizeOfNameBuffer)
Get the attribute name from a class and attrref.
Definition: rt_gdh.c:369
pwr_tStatus gdh_SetAlarmBlockLevel(pwr_tObjid object, pwr_tUInt32 alarmBlockLevel)
Sets the alarm block level for a certain object.
Definition: rt_gdh.c:3545
pwr_tStatus gdh_GetChild(pwr_tObjid object, pwr_tObjid *firstChild)
Get the object identity of the first child of an object.
Definition: rt_gdh.c:1430
pwr_tStatus gdh_GetObjectClass(pwr_tObjid object, pwr_tClassId *classid)
Get the class identifier of an object.
Definition: rt_gdh.c:1107
pwr_tStatus gdh_SetObjectInfoDeltaTime(const char *name, pwr_tDeltaTime *time)
Store a delta time value in an attribute. Sets the time lock to ensure that the time is not modified ...
Definition: rt_gdh.c:5569
pwr_tStatus gdh_ObjidToPointer(pwr_tObjid object, void **objectData)
Gets the address of the data of an object, given its object identity.
Definition: rt_gdh.c:2431
pwr_tStatus gdh_ObjidToName(pwr_tObjid oid, char *namebuf, pwr_tUInt32 size, pwr_tBitMask nametype)
Get the name of an object identified by its object identity.
Definition: rt_gdh.c:2371
pwr_tStatus gdh_SubData(pwr_tSubid subid, void *buffer, unsigned int sizeOfBuffer)
Fetch the data associated with a subscription.
Definition: rt_gdh.c:3064
void gdh_SetStrDL(char *sp, const char *str, int size)
Thread save function to store a direct linked string value. Sets the string lock to ensure that the s...
Definition: rt_gdh.c:5487
pwr_tStatus gdh_ClassNameToId(const char *className, pwr_tClassId *classid)
Get the class identity corresponding to a class specified by name.
Definition: rt_gdh.c:413
pwr_tStatus gdh_GetVolumeInfo(pwr_tVid vid, gdh_sVolumeInfo *info)
Get info for a volume.
Definition: rt_gdh.c:3771
pwr_tStatus gdh_GetSecurityInfo(pwr_sSecurity *security)
Get security information.
Definition: rt_gdh.c:5165
pwr_tStatus gdh_UnrefObjectInfoAll(void)
Terminates all subscriptions set up by this process.
Definition: rt_gdh.c:3498
pwr_tStatus gdh_GetNextObjectAttrRef(pwr_tClassId cid, pwr_sAttrRef *arp, pwr_sAttrRef *new_arp)
Get the attrref of the next attribute object of a specified class in a specified object.
Definition: rt_gdh.c:1792
pwr_tStatus gdh_Init(const char *name)
Initialize the process to the Proview runtime environment.
Definition: rt_gdh.c:2065
pwr_tStatus gdh_GetNodeObject(pwr_tNodeId nodeIndex, pwr_tObjid *object)
Return the objid of the node object for a node identified by a node identifier (of type pwr_tNodeId).
Definition: rt_gdh.c:1822
pwr_tStatus gdh_SubRefObjectInfoAttrref(pwr_sAttrRef *attributeReference, pwr_tSubid *subid)
This routine returns a subid to the information that is denoted by 'aref'. The name can be either an ...
Definition: rt_gdh.c:2917
pwr_tStatus gdh_AttrStringToValue(int type_id, char *value_str, void *buffer_ptr, int buff_size, int attr_size)
Convert an attribute string to value.
Definition: rt_gdh.c:4879
pwr_tStatus gdh_AttrrefToName(pwr_sAttrRef *attributeReference, char *nameBuffer, unsigned int sizeOfNameBuffer, pwr_tBitMask nameType)
Translate an attribute referece to a name.
Definition: rt_gdh.c:128
pwr_tStatus gdh_GetAlarmInfo(pwr_tObjid object, pwr_tUInt32 *alarmLevel, pwr_tUInt32 *maxAlarmLevel, pwr_tUInt32 *alarmBlockLevel, pwr_tUInt32 *maxAlarmBlockLevel, pwr_tUInt32 *alarmVisibility)
Get the alarm status for a certain object.
Definition: rt_gdh.c:670
pwr_tStatus gdh_GetObjectInfoDeltaTime(const char *name, pwr_tDeltaTime *time)
Fetch an delta time value from an attribute. Sets the time lock to ensure that the time is not modifi...
Definition: rt_gdh.c:5548
pwr_tStatus gdh_UnrefObjectInfo(pwr_tSubid subid)
Terminates the subscription defined by the subscription identity.
Definition: rt_gdh.c:3470
pwr_tStatus gdh_RefObjectInfo(char *attributeName, void **objectData, pwr_tSubid *subid, unsigned int sizeOfObjectData)
The routine returns an address to the data that is denoted by Name. The name can be either an object ...
Definition: rt_gdh.c:3426
pwr_tStatus gdh_SetObjectInfo(const char *attributeName, void *buffer, unsigned int sizeOfBuffer)
Change the value of an attribute or the whole body of an object.
Definition: rt_gdh.c:2579
pwr_tStatus gdh_GetPreviousSibling(pwr_tObjid object, pwr_tObjid *previousSibling)
Get the object identity of the previous sibling (i.e. the previous object with the same parent).
Definition: rt_gdh.c:1509
pwr_tStatus gdh_DeleteObject(pwr_tObjid objectId)
Remove a local object.
Definition: rt_gdh.c:513
pwr_tStatus gdh_NameToObjid(const char *objectName, pwr_tObjid *objid)
Get the object identity of an object with name 'name'.
Definition: rt_gdh.c:2202
pwr_tStatus gdh_DLUnrefObjectInfo(pwr_tDlid directLinkId)
Terminate direct linking of an object or an object attribute.
Definition: rt_gdh.c:637
pwr_tStatus gdh_SubSize(pwr_tSubid subid, unsigned int *size)
Fetch the data size associated with a subscription.
Definition: rt_gdh.c:3150
pwr_tStatus gdh_GetNodeInfo(pwr_tNodeId nodidx, gdh_sNodeInfo *ip)
Return info for a node identified by a node identifier (of type pwr_tNodeId).
Definition: rt_gdh.c:1854
pwr_tStatus gdh_SubUnrefObjectInfoList(unsigned int nEntry, pwr_tSubid *subid)
Terminates a list of subscriptions.
Definition: rt_gdh.c:2970
pwr_tStatus gdh_SubUnrefObjectInfo(pwr_tSubid subid)
Terminates subscription of an object or an attribute.
Definition: rt_gdh.c:3033
pwr_tStatus gdh_GetObjectSize(pwr_tObjid oid, pwr_tUInt32 *size)
Get the size of the body of an object.
Definition: rt_gdh.c:1025
void gdh_StoreRtdbPointer(unsigned long *rtdbReference, void *virtualAddress)
Convert pointer to rtdb relative pointer.
Definition: rt_gdh.c:3572
pwr_tStatus gdh_AttrArefToObjectAref(pwr_sAttrRef *arp, pwr_sAttrRef *oarp)
Get the attribute reference to an object or attribute object, from the attribute reference to an attr...
Definition: rt_gdh.c:257
void gdh_SubUnrefObjectInfoAll(void)
Terminates all subscriptions set up by this user (job/process).
Definition: rt_gdh.c:3052
pwr_tStatus gdh_SetSubscriptionDefaults(pwr_tInt32 defaultUpdateTime, pwr_tInt32 defaultTimeOut)
Sets default subscription timers for future subscription requests.
Definition: rt_gdh.c:3234
pwr_tStatus gdh_GetSubscriptionOldness(pwr_tSubid subid, pwr_tBoolean *isOld, pwr_tTime *lastUpdate, pwr_tStatus *lastStatus)
Checks the oldness of a certain subscription.
Definition: rt_gdh.c:1358
pwr_tStatus gdh_GetVolumeList(pwr_tVid *vid)
Get the first volume.
Definition: rt_gdh.c:3678
pwr_tStatus gdh_SetObjectInfoAttrref(pwr_sAttrRef *attributeReference, void *buffer, unsigned int sizeOfBuffer)
Change the data of an object or an attribute.
Definition: rt_gdh.c:2722
pwr_tStatus gdh_AttrValueToString(pwr_eType type_id, pwr_tTid tid, void *value_ptr, char *str, int size, int *len, char *format)
Convert a string to attribute value.
Definition: rt_gdh.c:4549
pwr_tStatus gdh_GetObjectLocation(pwr_tObjid object, pwr_tBoolean *isLocal)
Return the location of an object.
Definition: rt_gdh.c:1219
pwr_tStatus gdh_NameToPointer(const char *objectName, void **objectData)
Get the address of the data of an object, given its name.
Definition: rt_gdh.c:2240
pwr_tStatus gdh_GetAttributeFlags(pwr_sAttrRef *arp, unsigned int *flags)
Get the flags of an attribute.
Definition: rt_gdh.c:1994
pwr_tStatus gdh_GetAttrRefTid(pwr_sAttrRef *arp, pwr_tTid *tid)
Get the type or class identifier of an attribute reference.
Definition: rt_gdh.c:1145
pwr_tStatus gdh_GetRootList(pwr_tObjid *object)
Get the first root object in the object tree.
Definition: rt_gdh.c:1571
pwr_tStatus gdh_DLRefObjectInfoAttrref(pwr_sAttrRef *addressOfAttributeReference, void **objectData, pwr_tDlid *directLinkId)
Request a direct link to the data denoted by an attribute reference.
Definition: rt_gdh.c:578
pwr_tStatus gdh_VolumeIdToName(pwr_tVid vid, char *name, int size)
Get the name for a volume denoted by volume identity.
Definition: rt_gdh.c:3744
void * gdh_TranslateRtdbPointer(unsigned long rtdbReference)
Convert rtdb relative pointer to absolute pointer.
Definition: rt_gdh.c:3593
void gdh_GetStrDL(char *sp, char *str, int size)
Thread save function to fetch a direct linked string value. Sets the string lock to ensure that the s...
Definition: rt_gdh.c:5470
pwr_tStatus gdh_AttrRefToPointer(pwr_sAttrRef *arp, void **p)
Gets the address of the data of an attribute reference.
Definition: rt_gdh.c:2493
pwr_tStatus gdh_GetObjectClassList(pwr_tCid cid, pwr_tOid oid, pwr_sAttrRef *arp)
Get the attribute reference of the first attribute object of a specified class in the specified objec...
Definition: rt_gdh.c:1768
pwr_tStatus gdh_GetNextAttrRef(pwr_tClassId cid, pwr_sAttrRef *arp, pwr_sAttrRef *new_arp)
Get the attrref of the next object in the list of objects of a certain class. The object can be a sol...
Definition: rt_gdh.c:1742
void gdh_GetDeltaTimeDL(pwr_tDeltaTime *dtp, pwr_tDeltaTime *time)
Thread save function to fetch a direct linked delta time value. Sets the time lock to ensure that the...
Definition: rt_gdh.c:5436
pwr_tStatus gdh_GetObjectInfoTime(const char *name, pwr_tTime *time)
Fetch an absolute time value from an attribute. Sets the time lock to ensure that the time is not mod...
Definition: rt_gdh.c:5506
pwr_tStatus gdh_GetPreviousObject(pwr_tObjid object, pwr_tObjid *previousObject)
Get the object identity of the previous object in the list of objects of a certain class.
Definition: rt_gdh.c:2031
pwr_tStatus gdh_SubRefObjectInfoName(char *attributeName, pwr_tSubid *subid)
Get the address of the data that is denoted by 'name'.
Definition: rt_gdh.c:2944
pwr_tStatus gdh_GetAttributeCharacteristics(char *name, pwr_tTypeId *tid, pwr_tUInt32 *size, pwr_tUInt32 *offs, pwr_tUInt32 *elem)
Get the characteristics of an attribute, given its name and the class it belongs to.
Definition: rt_gdh.c:1892
pwr_tStatus gdh_GetNextVolume(pwr_tVid pvid, pwr_tVid *vid)
Get the next volume in the volume list.
Definition: rt_gdh.c:3706
pwr_tStatus gdh_RenameObject(pwr_tObjid objectId, char *newObjectName)
Rename a local object.
Definition: rt_gdh.c:2534
pwr_tStatus gdh_GetLocalParent(pwr_tObjid object, pwr_tObjid *parent)
Get the object identity of the local parent of an object.
Definition: rt_gdh.c:1320
pwr_tStatus gdh_GetAttributeCharAttrref(pwr_sAttrRef *attributeReference, pwr_tTypeId *attributeType, unsigned int *attributeSize, unsigned int *attributeOffset, unsigned int *attributeDimension)
Get the characteristics of an attribute.
Definition: rt_gdh.c:1949
pwr_tStatus gdh_GetNodeIndex(pwr_tNodeId *nodeIndex)
Get the node identity of the local node.
Definition: rt_gdh.c:729
pwr_tStatus gdh_GetRootVolume(pwr_tVid *vid)
Get info for a volume.
Definition: rt_gdh.c:3801
pwr_tStatus gdh_CreateObject(char *objectName, pwr_tClassId classid, unsigned int sizeOfObjectData, pwr_tObjid *objectId, pwr_tObjid internal1, pwr_tBitMask internal2, pwr_tObjid internal3)
Create an object in a dynamic volume.
Definition: rt_gdh.c:455
pwr_tStatus gdh_RefObjectInfoList(unsigned int nEntry, gdh_sObjRef *objectReference, pwr_tSubid *subid)
This routine returns addresses to the information that is denoted by "objref[].fullname".
Definition: rt_gdh.c:3265
pwr_tStatus gdh_SetObjectInfoTime(const char *name, pwr_tTime *time)
Store an absolute time value in an attribute. Sets the time lock to ensure that the time is not modif...
Definition: rt_gdh.c:5527
pwr_tStatus gdh_GetDynamicAttrSize(pwr_tObjid oid, char *name, pwr_tUInt32 *size)
Get the size of a dynamic attribute.
Definition: rt_gdh.c:1055
pwr_tStatus gdh_FWriteObject(char *filename, pwr_tAttrRef *arp)
Write the content of an object to textfile.
Definition: rt_gdh.c:4404
pwr_tStatus gdh_GetSuperClass(pwr_tCid cid, pwr_tCid *supercid, pwr_tObjid oid)
Get the superclass for a class.
Definition: rt_gdh.c:4054
pwr_tStatus gdh_GetObjectNodeIndex(pwr_tObjid object, pwr_tNodeId *nodeIndex)
Get the node identity of the owner node of an object.
Definition: rt_gdh.c:750
unsigned int pwr_tUInt32
32-bit unsigned integer type.
Definition: pwr.h:233
char pwr_tAName[399+1]
Full Aref Name type.
Definition: pwr.h:397
pwr_tNid pwr_tNodeId
Node identity type.
Definition: pwr.h:298
unsigned int pwr_tVid
Volume identity type.
Definition: pwr.h:237
unsigned int pwr_tBitMask
Bitmask type.
Definition: pwr.h:123
pwr_tTid pwr_tTypeId
Type identity type.
Definition: pwr.h:279
unsigned int pwr_tBoolean
Boolean type.
Definition: pwr.h:127
pwr_tCid pwr_tClassId
Class identity type.
Definition: pwr.h:274
pwr_tRid pwr_tSubid
Subscription identity type.
Definition: pwr.h:312
unsigned int pwr_tCid
Class identity type.
Definition: pwr.h:273
char pwr_tString40[40]
40 byte string type.
Definition: pwr.h:420
int pwr_tInt32
32-bit integer type.
Definition: pwr.h:159
int pwr_tStatus
Status type.
Definition: pwr.h:284
void * pwr_tAddress
Generic pointer type.
Definition: pwr.h:121
pwr_tRid pwr_tDlid
Direct link identity type.
Definition: pwr.h:311
unsigned int pwr_tTid
Type identity type.
Definition: pwr.h:278
unsigned int pwr_tDisableAttr
DisableAttr type.
Definition: pwr.h:464
pwr_tVolumeId pwr_tNid
Node identity type.
Definition: pwr.h:297
char pwr_tObjName[31+1]
Object name type.
Definition: pwr.h:377
Include file for Errh System log messages.
pwr_uParDef * attr
Definition: rt_gdh.h:148
pwr_eClass attrClass
Definition: rt_gdh.h:146
unsigned long flags
Definition: rt_gdh.h:147
unsigned long attrLevel
Definition: rt_gdh.h:145
pwr_tObjName attrName
Definition: rt_gdh.h:144
pwr_sBit * Bit
Definition: rt_gdh.h:166
pwr_tObjName Name
Definition: rt_gdh.h:165
pwr_mClassDef Flags
Definition: rt_gdh.h:127
pwr_tUInt32 nix
Definition: rt_gdh.h:96
pwr_tUInt32 upcnt
Definition: rt_gdh.h:102
pwr_tObjid objid
Definition: rt_gdh.h:99
pwr_tNodeId nodidx
Definition: rt_gdh.h:95
gdh_eLinkState linkstate
Definition: rt_gdh.h:100
pwr_tTime timedown
Definition: rt_gdh.h:104
pwr_tTime timeup
Definition: rt_gdh.h:103
pwr_tAName fullname
Definition: rt_gdh.h:74
unsigned int bufsize
Definition: rt_gdh.h:76
void * adrs
Definition: rt_gdh.h:75
pwr_sValue * Value
Definition: rt_gdh.h:157
pwr_tObjName Name
Definition: rt_gdh.h:156
pwr_tCid cid
Definition: rt_gdh.h:117
pwr_tTime time
Definition: rt_gdh.h:115
pwr_tBoolean isLoaded
Definition: rt_gdh.h:113
pwr_tBoolean isCached
Definition: rt_gdh.h:112
pwr_tNid nid
Definition: rt_gdh.h:118
pwr_tBoolean isMounted
Definition: rt_gdh.h:114
Attribute reference.
Definition: pwr.h:557
Delta time type.
Definition: pwr.h:369
Object identity type.
Definition: pwr.h:263