beautypg.com

P40vdla.h, B-52, Appendix b – Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual

Page 210

background image

Sample API Modules

Appendix B

B-52

#ifndef P40VDLA_H
#define P40VDLA_H 1

///////////////////////////////////////////////////////////////////////////////
// Definitions for the PCCC DOWNLOAD ALL COMMAND AND REPLY PACKETS //
///////////////////////////////////////////////////////////////////////////////

#include ”p40vspcc.h”

#pragma pack(1)
/***************************************************************************/
/************************ INTEL VERSION OF DEFINITIONS *********************/
/***************************************************************************/

/* The PCCC Download All command packet structure. */
typedef struct
{
UBYTE reserved[4];
UBYTE cmd;
UBYTE sts;
UWORD tns;
UBYTE fnc;
} PLC540V_PCCC_DLA_CMD_TYPE;
#define kPLC540V_PCCC_DLA_CMD_SIZE (sizeof(PLC540V_PCCC_DLA_CMD_TYPE))

/* The PCCC Download All reply packet structure. */
typedef struct
{
UBYTE lnhHi;
UBYTE lnhLo;
UBYTE reserved[4];
UBYTE cmd;
UBYTE sts;
UWORD tns;
UBYTE extsts;
} PLC540V_PCCC_DLA_RPY_TYPE;
#define kPLC540V_PCCC_DLA_RPY_SIZE (sizeof(PLC540V_PCCC_DLA_RPY_TYPE))
#pragma pack()

void plc540v_pccc_download_all(

ULONG vmeCmdBlkAddr,
UWORD baseAddress,
VME_DATA_WIDTH_TYPE width,
VME_ADDRESS_MODIFIER_TYPE addrMod,
PLC540V_PCCC_DLA_RPY_TYPE *reply,
PLC540V_STATUS_TYPE *status);

#endif

P40VDLA.H