/*
 * IPCDataSyncGlobal.h
 *
 *  Created on: Mar 23, 2025
 *      Author: tummalanr
 *
 *       @brief
 * IPCDataSync.h file is used in the System for Data Synch between CAN and CIP core
 * Contains Declarations and Structure Details.
 */

//#ifndef SRC_CIPCORE_DATASYNC_IPCDATASYNCGLOBAL_H_
//#define SRC_CIPCORE_DATASYNC_IPCDATASYNCGLOBAL_H_
#ifndef IPCDATASYNCGLOBAL_H_
#define IPCDATASYNCGLOBAL_H_


/**
* IPC Notify Message Id containing IO Modules / Modules in Pressure Zone Position No Mask Bits
*/
#define     POSITION_NOTIFY_ID_MASK                         0x0000003Fu

/**
* IPC Notify Message Id containing Modules Cyclic Type Data Mask Bits
*/
#define     CYCLICTYPE_NOTIFY_ID_MASK                       0x0000FF00u

/**
* IPC Notify Message Id containing Modules ACyclic Type Data Mask Bits
*/
#define     ACYCLICTYPE_NOTIFY_ID_MASK                      0x007F0000u

/**
* IPC Notify Message Id containing IO Modules Cyclic/ ACyclic Type Data Mask Bits
*/
#define     IOMODULEMSG_NOTIFY_ID                           0x00000040u

/**
* IPC Notify Message Id containing PressureZone Modules Cyclic/ ACyclic Type Data Mask Bits
*/
#define     PZMODULEMSG_NOTIFY_ID                           0x00000080u


/**
* IPC Notify Message Id containing IO Modules Cyclic DI Status Type Data Mask Bits
*/
#define IOCYCLIC_DISTS_NOTIFY_ID                        0x00000100      //lower byte[7:0] is instance no for  DI input status  [11:8] it is DI input status
/**
* IPC Notify Message Id containing IO Modules Cyclic AI Value Status Type Data Mask Bits
*/
#define IOCYCLIC_AIVALUE_NOTIFY_ID                      0x00000200      //lower byte[7:0] is instance no for  AI input status  [11:8] it is AI input status
/**
* IPC Notify Message Id containing IO Modules Cyclic AI Count Status Type Data Mask Bits
*/
#define IOCYCLIC_AICOUNT_NOTIFY_ID                      0x00000400      //lower byte[7:0] is instance no for  AI input status  [11:8] it is AI input status
/**
* IPC Notify Message Id containing IO Modules Cyclic Error Status Type Data Mask Bits
*/
#define IOCYCLIC_IOERRSTS_NOTIFY_ID                     0x00000800      //lower byte is instance no for  DI/DO/DIO/AI/AO/AIO [11:8] input Err status


/**
* IPC Notify Message Id containing IO Modules Cyclic DO Status Type Data Mask Bits
*/
#define IOCYCLIC_DOSTS_NOTIFY_ID                        0x00000100u      //lower byte[7:0] is instance no for  DO input status  [11:8] it is DO input status
/**
* IPC Notify Message Id containing IO Modules Cyclic AO Value Status Type Data Mask Bits
*/
#define IOCYCLIC_AOVALUE_NOTIFY_ID                      0x00000200u      //lower byte[7:0] is instance no for  AO input status  [11:8] it is AO input status
/**
* IPC Notify Message Id containing IO Modules Cyclic AO Count Status Type Data Mask Bits
*/
#define IOCYCLIC_AOCOUNT_NOTIFY_ID                      0x00000400u      //lower byte[7:0] is instance no for  AO input status  [11:8] it is AO input status


#define IOACYCLIC_DI_NOTIFY_ID                          0x00010000      //lower byte[7:0] is instance no for  DI Module Acyclic
#define IOACYCLIC_DO_NOTIFY_ID                          0x00020000      //lower byte[7:0] is instance no for  DI Module Acyclic
#define IOACYCLIC_DIO_NOTIFY_ID                         0x00040000      //lower byte[7:0] is instance no for  DIO Module Acyclic
#define IOACYCLIC_AI_NOTIFY_ID                          0x00080000      //lower byte[7:0] is instance no for  AI Module Acyclic
#define IOACYCLIC_AO_NOTIFY_ID                          0x00100000      //lower byte[7:0] is instance no for  AO Module Acyclic
#define IOACYCLIC_AIO_NOTIFY_ID                         0x00200000      //lower byte[7:0] is instance no for  AIO Module Acyclic

#define IOACYCLIC_WR_NOTIFY_ID                          0x00000000      //lower byte[7:0] is instance no for  io Module Acyclic and bit 24 [0] is WRITE Request
#define IOACYCLIC_RD_NOTIFY_ID                          0x00800000      //lower byte[7:0] is instance no for  io Module Acyclic and bit 24 [1] is Read Request

/**
* IPC Notify Message Id containing PressureZone Modules Cyclic Standard Stations Status Type Data Mask Bits
*/
#define PZCYCLIC_STNSTS_NOTIFY_ID                        0x00000800u      //lower byte[7:0] is instance no for  STN output status
/**
* IPC Notify Message Id containing PressureZone Modules Cyclic ISEM-DIAG Process Input Data Mask Bits
*/
#define PZCYCLIC_ISEMDIAG_NOTIFY_ID                      0x00001000u      //lower byte[7:0] is instance no for  ISEM-DIAG PDO status
/**
* IPC Notify Message Id containing PressureZone Modules Cyclic DIAG-VALVE Process Output Data Mask Bits
*/
#define PZCYCLIC_DIAGVAL_NOTIFY_ID                       0x00002000u      //lower byte[7:0] is instance no for  DIAG-VAL PDO status
/**
* IPC Notify Message Id containing PressureZone Modules Cyclic Internal PROP-VALVE Process Output Data Mask Bits
*/
#define PZCYCLIC_INTPROPVAL_NOTIFY_ID                       0x00004000u      //lower byte[7:0] is instance no for  Internal PROP-VAL PDO / SET POINT PRESSURE status

/**
* IPC Notify Message Id containing PressureZone Modules Cyclic External PROP-VALVE Process Input Data Mask Bits
*/
#define PZCYCLIC_EXTPROPVAL_NOTIFY_ID                       0x00008000u      //lower byte[7:0] is instance no for  External PROP-VAL PDO / SET POINT PRESSURE status

/**
* IPC Notify Message Id containing PressureZone Modules Cyclic Standard Stations Error Type Data Mask Bits
*/
#define PZCYCLIC_STNDVALERR_NOTIFY_ID                   0x00000100      //lower byte[7:0] is PZ no ( 1-5) [23:8] it is STND VAL /DV Err status

/**
* IPC Notify Message Id containing PressureZone Modules Cyclic ISEM-DIAG Process Input Data Mask Bits
*/
#define PZCYCLIC_ISEMDIAGPDI_NOTIFY_ID                  0x00000200      //lower byte[7:0] is PZ no ( 1-5) [23:8] it is ISEM-DIAG PDI

/**
* IPC Notify Message Id containing PressureZone Modules Cyclic DIAG-VALVE Process Input Data Mask Bits
*/
#define PZCYCLIC_DIAGVALVEPDI_NOTIFY_ID                 0x00000400      //lower byte[7:0] is PZ no ( 1-5) [23:8] it is DIAG-VALVE PDI

//#define PZCYCLIC_DIAGVALVEERR_NOTIFY_ID                 0x00000800      //lower byte[7:0] is PZ no ( 1-5) [23:8] it is DIAG-VALVE ERROR status
/**
* IPC Notify Message Id containing PressureZone Modules Cyclic PROP-VALVE Process Input Data Mask Bits
*/
#define PZCYCLIC_PROPPDI_NOTIFY_ID                      0x00000800      //lower byte[7:0] is PZ no ( 1-5) [23:8] it is PROP PDI & OUTPUT PORT PRESSURE
//#define PZCYCLIC_PROPOPPRESS_NOTIFY_ID                  0x00002000      //lower byte[7:0] is PZ no ( 1-5) [23:8] it is PROP OUTPUT PORT PRESSURE


#define PZACYCLIC_ISEMBASE_NOTIFY_ID                          0x00010000      //lower byte[7:0] is instance no for  ISEM BASE Module Acyclic
#define PZACYCLIC_ISEMDIAG_NOTIFY_ID                          0x00020000      //lower byte[7:0] is instance no for  ISEM DIAG Module Acyclic
#define PZACYCLIC_DIAGVAL_NOTIFY_ID                           0x00040000      //lower byte[7:0] is instance no for  DIAG VALVE Module Acyclic
#define PZACYCLIC_PROPBASE_NOTIFY_ID                          0x00080000      //lower byte[7:0] is instance no for  PROP BASE Module Acyclic
#define PZACYCLIC_PROPVAL_NOTIFY_ID                           0x00100000      //lower byte[7:0] is instance no for  PROP VALVE Module Acyclic

#define SYSCONFIGSTS_WR_NOTIFY_ID                          0x00000000      //lower byte[7:0] is instance no for    and bit 24 [0] is WRITE Request
#define SYSCONFIGSTS_RD_NOTIFY_ID                          0x00800000      //lower byte[7:0] is instance no for    and bit 24 [1] is Read Request

/**
* IPC Notify Message Id containing All Modules Discovery Finish Data Mask Bits
*/
#define MODULEDISCOVERYFINISH_NOTIFYID              		0x00000100u
/**
* IPC Notify Message Id MBN IDENTIFICATION Data Mask Bits
*/
#define MBNIDENTIFICATIONINFO_NOTIFYID              		0x00000200u
/**
* IPC Notify Message Id Module IDENTIFICATION Data Mask Bits
*/
#define MODIDENTIFICATIONINFO_NOTIFYID              		0x00000400u
/**
* IPC Notify Message Id CIP PROTOCOL TYPE Mask Bits
*/
#define CIPPROTOCOLINFO_NOTIFYID              				0x00000800u
/**
* IPC Notify Message Id CIP IP ADDRESS DATA Mask Bits
*/
#define CIPIPADDRINFO_NOTIFYID              				0x00001000u
/**
* IPC Notify Message Id CIP MAC ADDRESS DATA Mask Bits
*/
#define CIPMACADDRINFO_NOTIFYID              				0x00002000u
/**
* IPC Notify Message Id CIP PIN DATA Mask Bits
*/
#define CIPPININFO_NOTIFYID              					0x00004000u
/**
* IPC Notify Message Id CIP PSWD DATA Mask Bits
*/
#define CIPPSWDINFO_NOTIFYID              					0x00008000u
/**
* IPC Notify Message Id MBN OPR MODE DATA Mask Bits
*/
#define MBNOPRMODEINFO_NOTIFYID              				0x00010000u
/**
* IPC Notify Message Id MBN SYSTEM CONFIGURATION SHORT CODE DATA Mask Bits
*/
#define MBNSHORTCODEINFO_NOTIFYID              				0x00020000u



/**
*  DATA Write Process
*/
#define             DATA_WR             0x00
/**
*  DATA Read Process
*/
#define             DATA_RD             0x01

#endif /* SRC_CIPCORE_DATASYNC_IPCDATASYNCGLOBAL_H_ */
