beautypg.com

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

Page 244

background image

Sample API Modules

Appendix B

B-86

#ifndef P40VULA_H
#define P40VULA_H 1

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

#include ”p40vspcc.h”

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

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

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

void plc540v_pccc_upload_all(
ULONG vmeCmdBlkAddr,
UWORD baseAddress,
VME_DATA_WIDTH_TYPE width,
VME_ADDRESS_MODIFIER_TYPE addrMod,

PLC540V_PCCC_ULA_RPY_TYPE *reply,

PLC540V_STATUS_TYPE *status);
#endif

P40VULA.H