/以下是用于loDriver::ldFlags的标志。
#define loDF_IGNCASE (0x80) / ItemId对比时忽略大小写。
#define loDF_IGNACCPATH (0x40) / ItemMgmt::AddItem()中忽略访问路径。
#define loDF_NOCONV (0x100) / 不允许数据类型转换。
#define loDF_NOCOMP (0x200) / 标签值不作比较,时间戳进行比较
#define loDF_CHECKITEM (0x1000) / 引发ldAskItemID()被调用
#define loDF_CANONAME (0x2000)
/ 例如:ldAskItemId("level.one")返回"level:1"标签,如果loDF_CANONAME被指定,创建OPC ITEM的时候"level:1"就被指定,但会花费一些内存,未命名的标签将被忽略。
#define loDF_SUBSCRIBE_RAW (0x80000)
/ 影响loDriver::ldSubscribe(),如果被指定,不同的组不同的客户端的活动标签的每个变化都会激发ldSubscribe(),否则,只有活动的全局变化才会被监控。
/ 以下标签改变空枚举器返回。
#define loDf_EE_SOK (1) / 返回S_OK和空枚举器
#define loDf_EE_NULL (2) / 返回S_FALSE和NULL枚举器
#define loDf_EE_SFALSE (3) / 返回S_FALSE和空枚举器(默认)
#define loDf_DWG (0x04) / Destroy服务器和所有未释放的组
#define loDf_NOFORCE (0x08) / 忽略RemoveGroup()中的FORCE标记
/ 以下三个标签只用于进程内服务器,线程模型
#define loDf_FREEMARSH (0x10000)
#define loDf_BOTHMODEL (0x20000)
#define loDf_FREEMODEL (0x40000)
/ 以下是用于ldReadTags()的专门返回值
#define loDR_CACHED (1)
#define loDR_STORED (2)
/ 以下是用于ldWriteTags()的专门返回值
#define loDW_ALLDONE (0)
#define loDW_TOCACHE (1)
/ 以下是调用ldAskItemID()时可能的目标,将来可能返回常数。
#define loDAIG_MASK (0x00f0) /mask of a main goal code, no subcodes defined yet
#define loDAIG_LOINT (0x0000) / LOPC内在需要
#define loDAIG_ADDITEM (0x0010) / OPCItemMgt::AddItems()
#define loDAIG_VALIDATE (0x0020) / OPCItemMgt::ValidateItem()
#define loDAIG_BROWSE (0x0030) / OPCBrowseAddressSpace::的一个方法
#define loDAIG_IPROPERTY (0x0040) / OPCItemProperties::
#define loDAIG_IPROPQUERY (0x0041) / OPCItemProperties::QueryAvailableProperties()
#define loDAIG_IPROPGET (0x0042) / OPCItemProperties::GetItemProperties()
#define loDAIG_IPROPLOOKUP (0x0043) / OPCItemProperties::LookupItemID()
#define loDAIG_IPROPRQUERY (0x0045) / Query VarType of a tag referenced as property
#define loDAIG_IPROPRGET (0x0046) / Readig value of a tag referenced as property
typedef struct loVendorInfo /卖主信息
{
WORD lviMajor, lviMinor, lviBuild, lviReserv;
Char *lviInfo;
} loVendorInfo;
/ 初始化的第一步(after initing a logging facility)
int loServiceCreate(loService **result,
const loDriver *,
unsigned tagcount); / 设定标签上限,只要内存允许
/ 每个标签loAddRealTag_b*()消耗150字节,loAddRealTag*()消耗250个字节
int loServiceDestroy(loService *se) / 实际上服务器不会Destroy,非线程安全
/ 创建一个新客户端连接到服务器
int loClientCreate(loService *se,
loClient **cli,
int ldFlags,
const loVendorInfo *vi,
void (*release_handle)(void *,
loService *,
loClient *),
void *release_handle_arg);
/ 创建一个聚合服务器对象
int loClientCreate_agg(loService *se,
loClient **cli,
IUnknown *outer,
IUnknown **inner,
Int ldFlags,
Const loVendorInfo *vi,
Void (*release_handle)(void *,
loService *,
loClient *),
Void *release_handle_arg);
int loClientChain(loClient *cli,
HRESULT (*qi_chain)(void *rha,
loService *,
loClient *,
const IID *,
LPVOID *),
void (*release_handle)(void *rha,
loService *,
loClient *),
void *release_handle_arg);
#define loAM_RDWR (1) / 读写模式(默认)
#define loAM_RDONLY_OP (2) / 禁止写
#define loAM_RDONLY_ADD (4) / report all tags as read-only for Add/Validate/EnumIetmAttr
#define loAM_RDONLY_BROWSE (8) / report all tags as read-only for Browse
#define loAM_NOREAD_DEV (0x10) / perform cache read instead of device read
#define loAM_ERREAD_DEV (0x20) / error on device read
/ 指定客户端的访问模式
Int loClientAccessMode(loService *,
loClient *,
int accmode);
/ 返回服务器的release_handle_arg
Void *loClientArg(loClient *);
/ 返回服务器的loDriver::ldDriverArg
Void *loDriverArg(loService *);
#define loDriverArg(se) (*((void**)se))
/ 创建一个标签
int loAddRealTag(loService *,
loTagId *ti,
loRealTag rt,
const char *tName,
int tFlag,
unsigned tRight,
VARIANT *tValue,
/*OPCEUTYPE*/int tEUtype,
VARIANT *tEUinfo);
#define loTF_NOCOMP (loDF_NOCOMP)
#define loTF_NOCONV (loDF_NOCONV)
#define loTF_EMPTY (0x400)
#define loTF_CONVERT (0x800)
#define loTF_CHECKITEM (loDF_CHECKITEM)
#define loTF_CANONAME (loDF_CANONAME)
#define loTF_NOBROWSE (0x4000)
int loAddRealTag_a(loService *,
loTagId *ti,
loRealTag rt,
const char *tName,
int tFlag,
unsigned tRight,
VARIANT *tValue,
Double range_min,
Double range_max);
int loAddRealTag_b(loService *,
loTagId *ti,
loRealTag rt,
const char *tName,
int tFlag,
unsigned tRight,
loTagId tBase);
int loAddRealTagW(loService *,
loTagId *ti,
loRealTag rt,
const loWchar *tName,
int tFlag,
unsigned tRight,
VARIANT *tValue,
/*OPCEUTYPE*/int tEUtype,
VARIANT *tEUinfo);
int loAddRealTag_aW(loService *,
loTagId *ti,
loRealTag rt,
const loWchar *tName,
int tFlag,
unsigned tRight,
VARIANT *tValue,
double range_min,
double range_max);
int loAddRealTag_bW(loService *,
loTagId *ti,
loRealTag rt,
const loWchar *tName,
int tFlag,
unsigned tRight,
loTagId tBase);
联系客服