/*
 * SharedMemoryGlobalObjs.h
 *
 *  Created on: Nov 14, 2025
 *      Author: tummalanr
 */

#ifndef SHAREDMEMORYGLOBALOBJS_H_
#define SHAREDMEMORYGLOBALOBJS_H_


#include "SharedMemoryGlobal.h"


//#define         System_DiscoveryInfo_Addr               0xA5000000u
//#define         IOModule_ServiceInfo_Addr               (System_DiscoveryInfo_Addr + sizeof(system_discoverystatusinfo))
//#define         IOAcyclic_RDRequest_Addr                (IOModule_ServiceInfo_Addr + (sizeof(iomodule_serviceinfo) * IO_INSTANCE_MAX))
//#define         IOAcyclic_RDResponse_Addr               (IOAcyclic_RDRequest_Addr + sizeof(ioacyclic_client_reqresp))
//#define         IOAcyclic_WRRequest_Addr                (IOAcyclic_RDResponse_Addr + sizeof(ioacyclic_client_reqresp))
//#define         IOAcyclic_WRResponse_Addr               (IOAcyclic_WRRequest_Addr + sizeof(ioacyclic_client_reqresp))
//#define         PZxACyclic_info_Addr                    (IOAcyclic_WRResponse_Addr + sizeof(ioacyclic_client_reqresp))
//#define         PZxAcyclic_RDRequest_Addr               (PZxACyclic_info_Addr + (sizeof(pzx_serviceinfo) * PRESSUREZONES_MAX))
//#define         PZxAcyclic_RDResponse_Addr              (PZxAcyclic_RDRequest_Addr + sizeof(pzacyclic_client_reqresp))
//#define         PZxAcyclic_WRRequest_Addr               (PZxAcyclic_RDResponse_Addr + sizeof(pzacyclic_client_reqresp))
//#define         PZxAcyclic_WRResponse_Addr              (PZxAcyclic_WRRequest_Addr + sizeof(pzacyclic_client_reqresp))
//#define         ExternPropPZxACyclicinfo_Addr           (PZxAcyclic_WRResponse_Addr + sizeof(pzacyclic_client_reqresp))
//#define         Ecat_appindicatortate_Addr              (ExternPropPZxACyclicinfo_Addr + (sizeof(pzxextprop_serviceinfo) * EXTPROP_PRESSUREZONES_MAX))
//#define         Emergency_info_Addr                     (Ecat_appindicatortate_Addr + sizeof(ecat_runstateinfo))
//#define         MBN_Service_info_Addr                   (Emergency_info_Addr + (sizeof(EmergencyMsg_Info) * MAX_Emcy_Msgs))
//
//#define         IOCyclic_Info_Addr                      (MBN_Service_info_Addr + sizeof(mbn_servicedata))
//#define         PZxCyclic_info_Addr                     (IOCyclic_Info_Addr + (sizeof(iomodule_processinfo) * IO_INSTANCE_MAX))
//#define         ExternalPropPZxCyclic_info_Addr         (PZxCyclic_info_Addr + (sizeof(pzxmodules_processinfo) * PRESSUREZONES_MAX))

/*!
 *  <!-- Description: -->
 *
 *  \brief
 *  Shared Memory Allocation.
 *  Available Shared Memory Region    : Start Address : 0xA5000000   End Address : 0xA5800000  Size : 8 MB = 8,388,608 Bytes.
 *  Allocated Shared Memory Region    : Start Address : 0xA5000000   End Address : 0xA5100000  Size : 1 MB = 1,048,576 Bytes.
 *  USED Shared Memory  :
 *
 *  USER SHARED MEM         :     256 KB  = 262144 Bytes. 512KB = 524288 Bytes.
 *                          : IN DDR      : 0xA5000000 ~ 0xA507FFFF.
 *  LOG  SHARED MEM         :      16 KB  =  16384 Bytes.
 *                         *: IN DDR      : 0xA5080000 ~ 0xA5083FFF.
 *                          : In MSRAM    : 0x701D0000 ~ 0x701D3FFF.
 *  RTOS_NORTOS_IPC_SHM_MEM :     ~48 KB  =  49153 Bytes.
 *                         *: IN DDR      : 0xA5084000 ~ 0xA508FFFF.
 *                          : In MSRAM    : 0x701D4000 ~ 0x701DFFFF.
 *
 * * If not used can be added to USER SHARED MEM
 *
 */

/**
 *  <!-- Description: -->
 *
 *  \brief
 *  Data Shared Between CAN Core and CIP Core for  Discovered IO Module details,PZ details / Status.
 *
 * Boards : DI / DO / DIO / AI /AO /AIO / ISEM/PROP Modules                                                 Total :   193 bytes.
*/
//volatile    system_discoverystatusinfo      system_discovery_status __attribute__((location(System_DiscoveryInfo_Addr), aligned(1), section(".bss.user_shared_mem")));
volatile    system_discoverystatusinfo      system_discovery_status __attribute__(( aligned(1), section(".bss.user_shared_mem")));

/**
 * USER SHARED MEM  Total Size :
 * 193 + 180 + 2421 + 28 + 28 + 28 + 28 + 7740 + 66860 + 29 + 29 + 29 + 29 + 160 + 5440 + 4 + 5500 + XXXX
 * Total : 88,726 + XXXX
 */
#endif /* SHAREDMEMORYGLOBALOBJS_H_ */

//volatile    uint32_t      tempbufftest32[100u] __attribute__((aligned(8), section(".bss.userappmem")));
//volatile    uint8_t      tempbufftest[101u] __attribute__((aligned(1), section(".bss.userappmem")));
//volatile    uint16_t      tempbufftest16[100u] __attribute__((aligned(1), section(".bss.userappmem")));

