versadac  1
versadac - Scalable Recorder Firmware
irep.h
1 /*---------------------------------------------------------------------------*/
2 /* Copyright (C) 2006 Woodhead Software & Electonics. All rights reserved. */
3 /*---------------------------------------------------------------------------*/
4 /* This program is protected by international copyright. */
5 /* */
6 /* The use of this software including but not limited to its Source Code */
7 /* is subject to restrictions as agreed in the license agreement between */
8 /* you and Woodhead. */
9 /* Copying or distribution is not allowed unless expressly permitted */
10 /* according to your license agreement with Woodhead. */
11 /*---------------------------------------------------------------------------*/
12 /* */
13 /* Project : STACK PROFINET Controller */
14 /* Component : IREP managment */
15 /* $Workfile:: irep.h $*/
16 /* $Revision:: 6 $*/
17 /* $Date:: 30/08/10 10:03 $*/
18 /* */
19 /*---------------------------------------------------------------------------*/
20 /* */
21 /* D e s c r i p t i o n : */
22 /* Access API to AREP array. Internal used */
23 /* */
24 /*---------------------------------------------------------------------------*/
25 #ifndef _IREP_H
26 #define _IREP_H
27 
28 #include "arep.h"
29 #include "crep.h"
30 
31 #include "os_pck.h"
32 typedef struct _IREP{
33 
34  ST_CLR_RPC_UUID uuidObjectUUID; /* Object UUID use in RPC */
35  APP_DWORD dwIRContextInd; /*
36  Instance relation Contexte indicator
37  Handle give by user once an IR is created
38  This handle is restore each time a callback concerned by this AR is call. This handle is uuse in place of giving an AREp to the user
39  */
40 
41  APP_WORD wInUse;
42  APP_WORD wInstanceID;
43  ST_AREP stArep[MAX_CONNEXION_PER_INSTANCE];
44  ST_AREP stArepImplicit[1];
45  APP_LPVOID lpvDrep;
46 
47 }PACK_ALIGNEMENT(ST_IREP), APP_FAR * LPST_IREP;
48 #define ST_IREP_SIZEOF sizeof(ST_IREP)
49 #include "os_unpck.h"
50 
51 #define SET_IREP_CONTEXT_IND(lpstIrep, dwContextInd) (lpstIrep)->dwIRContextInd = (dwContextInd)
52 #define GET_IREP_CONTEXT_IND(lpstIrep) (lpstIrep)->dwIRContextInd
53 
54 #define SET_IREP_INSTANCEID(a,b) (a)->wInstanceID = b
55 #define GET_IREP_INSTANCEID(a) (a)->wInstanceID
56 
57 #define IREP_GET_AREP(lpstIrep, lpstArep, index) lpstArep = &(lpstIrep->stArep[index]);
58 
59 
60 #define GET_IREP_OBJECTUUID(pIrep) pIrep->uuidObjectUUID
61 #define SET_IREP_OBJECTUUID(pIrep,val) OS_MEMCOPY(&pIrep->uuidObjectUUID, &val,sizeof(ST_CLR_RPC_UUID))
62 
63 APP_VOID Init_Irep(APP_LPVOID lpstDrep, LPST_IREP lpstIrep);
64 APP_VOID Exit_Irep(LPST_IREP lpstIrep);
65 APP_VOID Irep_Init_UUID(LPST_IREP lpstIrep, LPST_CLR_RPC_UUID lpUuidBase);
66 #endif
Definition: irep.h:32