ProviewR Programmer's Reference Manual  V6.1.4
Functions
co_cdh.c File Reference

Functions for Cdh Class definition handler. More...

#include <ctype.h>
#include <errno.h>
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "co_cdh_msg.h"
#include "co_cdh.h"
#include "co_string.h"
#include "co_time.h"

Go to the source code of this file.

Functions

int cdh_ObjidCompare (pwr_tObjid Objid_1, pwr_tObjid Objid_2)
 Compare two object identities. More...
 
int cdh_ObjidIsEqual (pwr_tObjid Objid_1, pwr_tObjid Objid_2)
 Test if two object identities are equal. More...
 
int cdh_ObjidIsNotEqual (pwr_tObjid Objid_1, pwr_tObjid Objid_2)
 Test if two object identities are different. More...
 
int cdh_ObjidIsNull (pwr_tObjid Objid)
 Test if object identity is null. More...
 
int cdh_ObjidIsNotNull (pwr_tObjid Objid)
 Test if object identity is not null. More...
 
pwr_tClassId cdh_ClassObjidToId (pwr_tObjid Objid)
 Convert Objid to ClassId. More...
 
pwr_tObjid cdh_ClassIdToObjid (pwr_tClassId Class)
 Convert ClassId to Objid. More...
 
pwr_tTypeId cdh_TypeObjidToId (pwr_tObjid Objid)
 Convert Objid to TypeId. More...
 
int cdh_TypeIdToIndex (pwr_tTypeId Type)
 Convert TypeId to index.
 
pwr_tObjid cdh_TypeIdToObjid (pwr_tTypeId Type)
 Convert TypeId to Objid.
 
pwr_sAttrRef cdh_ObjidToAref (pwr_tObjid Objid)
 Converts an objid to an attrref.
 
pwr_tStatus cdh_AttrValueToString (pwr_eType Type, void *Value, char *String, int MaxSize)
 Converts an attribute given in internal binary format to a text string.
 
pwr_tStatus cdh_StringToAttrValue (pwr_eType Type, const char *String, void *Value)
 
void cdh_MaskToBinaryString (unsigned int mask, int noofbits, char *str)
 
pwr_tStatus cdh_StringToClassId (const char *s, pwr_tClassId *cid)
 Convert ClassId string to id. More...
 
pwr_tStatus cdh_StringToObjid (const char *s, pwr_tObjid *oid)
 Convert Objid string to id. More...
 
pwr_tStatus cdh_StringToAref (const char *s, pwr_tAttrRef *aref)
 Convert AttrRef string to id. More...
 
pwr_tStatus cdh_StringToTypeId (const char *s, pwr_tTypeId *tid)
 Convert TypeId string to id. More...
 
pwr_tStatus cdh_StringToVolumeId (const char *s, pwr_tVolumeId *vid)
 Convert VolumeId string to id. More...
 
pwr_tStatus cdh_StringToObjectIx (const char *s, pwr_tObjectIx *oix)
 Converts ObjectIx string to index. More...
 
void cdh_ClassIdToString (char *s, int size, pwr_tClassId cid, int prefix)
 Converts a class identifier, 'cid' to a string. More...
 
void cdh_TypeIdToString (char *s, int size, pwr_tTypeId tid, int prefix)
 Converts a type identifier, 'tid' to a string. More...
 
void cdh_ObjectIxToString (char *s, int size, pwr_tObjectIx oix, int prefix)
 Converts a object index, 'oix' to a string. More...
 
void cdh_ArefToString (char *s, int size, pwr_sAttrRef *aref, int prefix)
 Converts an attribute reference , 'aref' to a string. More...
 
char * cdh_AttrRefToString (pwr_sAttrRef *aref, int prefix)
 Converts an attribute reference , 'aref' to a string. More...
 
char * cdh_NodeIdToString (char *s, pwr_tNodeId nid, int prefix, int suffix)
 Converts a volume identifier, 'vid' to a string. More...
 
void cdh_OidToString (char *s, int size, pwr_tObjid oid, int prefix)
 Converts a object identifier, 'oid' to a string. More...
 
char * cdh_ObjidToString (pwr_tObjid oid, int prefix)
 Converts a object identifier, 'oid' to a string. More...
 
char * cdh_ObjidToFnString (char *s, pwr_tOid oid)
 Converts a object identifier, 'oid' to a filename string. More...
 
char * cdh_VolumeIdToString (char *s, int size, pwr_tVolumeId vid, int prefix, int suffix)
 Converts a volume identifier, 'vid' to a string. More...
 
char * cdh_VolumeIdToFnString (char *s, int size, pwr_tVolumeId vid)
 Converts a volume identifier, 'vid' to a filename string. More...
 
void cdh_SubidToString (char *s, int size, pwr_tSubid sid, int prefix)
 Converts a subscription identifier, 'sid' to a string. More...
 
void cdh_DlidToString (char *s, int size, pwr_tDlid did, int prefix)
 Converts a direct link identifier, 'did' to a string. More...
 
char * cdh_Low (const char *s)
 Convert string to lower case. More...
 
char * cdh_OpSysToStr (pwr_mOpSys opsys)
 Convert operating system to string. More...
 
char * cdh_OpSysToDirStr (pwr_mOpSys opsys)
 Convert operating system to directory string. More...
 
char * cdh_StringToObjectName (char *t, const char *s)
 Convert string to valid object name. More...
 
pwr_tStatus cdh_NextObjectName (char *t, const char *s)
 Create an similar objectname from another object name. More...
 
void cdh_CutNameSegments (char *outname, char *name, int segments)
 Cut the leading segments of an object name. More...
 
pwr_tUInt32 cdh_AttrSize (pwr_sParInfo *info)
 Get attribute size. More...
 
pwr_tUInt32 cdh_AttrElemSize (pwr_sParInfo *info)
 Get attribute array element size. More...
 

Detailed Description

Functions for Cdh Class definition handler.

ProviewR Open Source Process Control. Copyright (C) 2005-2025 SSAB EMEA AB.

This file is part of ProviewR.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ProviewR. If not, see http://www.gnu.org/licenses/

Linking ProviewR statically or dynamically with other modules is making a combined work based on ProviewR. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

In addition, as a special exception, the copyright holders of ProviewR give you permission to, from the build function in the ProviewR Configurator, combine ProviewR with modules generated by the ProviewR PLC Editor to a PLC program, regardless of the license terms of these modules. You may copy and distribute the resulting combined work under the terms of your choice, provided that every copy of the combined work is accompanied by a complete copy of the source code of ProviewR (the version used to produce the combined work), being distributed under the terms of the GNU General Public License plus this exception.

Definition in file co_cdh.c.