versadac
1
versadac - Scalable Recorder Firmware
Main Page
Classes
Files
File List
File Members
core
profinet_io
include
dcp.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 device */
14
/* Component : DCP main header */
15
/* $Workfile:: dcp.h $*/
16
/* $Revision:: 3 $*/
17
/* $Date:: 3/06/10 10:47 $*/
18
/* */
19
/*---------------------------------------------------------------------------*/
20
/* */
21
/* D e s c r i p t i o n : */
22
/* DCP Main header */
23
/* */
24
/*---------------------------------------------------------------------------*/
25
#ifndef _DCP_H
26
#define _DCP_H
27
28
APP_WORD Get_DCP_Buffer_Req (LPST_DREP_DCP_FRAME lpstDcpBuffer);
29
30
APP_WORD DCPComputeDelay (APP_WORD wResponseDelay, APP_LPBYTE lpbyMacAddr);
31
32
#define BUFFER_DCP_UNLOCK 0
33
34
/* GENERAL DCP MACROs */
35
#define SEND_DCP_FRAME(a,b,c)\
36
A_DATA_REQ(DREP_DCP_BUFFER_GET_PTR(a), DREP_DCP_BUFFER_GET_LEN(a), c);\
37
if( APP_TRUE == DREP_DCP_BUFFER_USED(a) && BUFFER_DCP_UNLOCK == b){\
38
pool_unlock_elt(&gstPoolDcp, a->pbyDcpBuffer);\
39
}
40
41
#define UNLOCK_DCP_BUFFER(a)\
42
if( APP_TRUE == DREP_DCP_BUFFER_USED(a)){\
43
pool_unlock_elt(&gstPoolDcp, a->pbyDcpBuffer);\
44
}\
45
DREP_RELEASE_DCP_BUFFER(a)
46
47
48
#define GET_DCP_SRC_MAC_ADRESSE(lppMsgg, lpMacSrc) (lpMacSrc=( (LPST_ETHERNETII_VLAN_FRAME_HEADER)((*ppMsg)->byData) )->MacSrcAddr)
49
#define GET_DCP_DST_MAC_ADRESSE(lppMsgg, lpMacDst) (lpMacDst=( (LPST_ETHERNETII_VLAN_FRAME_HEADER)((*ppMsg)->byData) )->MacDestAddr)
50
51
#endif
52
Generated on Wed Aug 19 2020 10:33:43 for versadac by
1.8.9.1