/*
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
* The corresponding license agreement applies. This hint shall not be removed.
*/

/**
* \addtogroup VRQx_EC VRQx_EC
* @{
*/

/**
\file VRQx_ECObjects
\author ET9300Utilities.ApplicationHandler (Version 1.6.4.0) | EthercatSSC@beckhoff.com

\brief VRQx_EC specific objects<br>
\brief NOTE : This file will be overwritten if a new object dictionary is generated!<br>
*/

/******************************************************************************
*                    Includes
******************************************************************************/
#include "Module0x000F9701_Objects.h" //reference Module 'Main-Bus Node' objects
//#include "Module0x000F9702_Objects.h" //reference Module 'DI-M8' objects
//#include "Module0x000F9703_Objects.h" //reference Module 'DI-M12' objects
//#include "Module0x000F9704_Objects.h" //reference Module 'DO-M8' objects
//#include "Module0x000F9705_Objects.h" //reference Module 'DO-M12' objects
//#include "Module0x000F9706_Objects.h" //reference Module 'DIO-M8' objects
//#include "Module0x000F9707_Objects.h" //reference Module 'DIO-M12' objects
//#include "Module0x000F9708_Objects.h" //reference Module 'AI' objects
//#include "Module0x000F9709_Objects.h" //reference Module 'AO' objects
//#include "Module0x000F970A_Objects.h" //reference Module 'AIO' objects
//#include "Module0x000F970B_Objects.h" //reference Module 'ISEM Basic' objects
//#include "Module0x000F970C_Objects.h" //reference Module 'ISEM Diagnostic' objects
//#include "Module0x000F970D_Objects.h" //reference Module 'Diagnostic Valve' objects
//#include "Module0x000F970E_Objects.h" //reference Module 'Standard Valve' objects
//#include "Module0x000F970F_Objects.h" //reference Module 'Internal Proportional Valve' objects
//#include "Module0x000F9710_Objects.h" //reference Module 'External Proportional Valve' objects
//#include "Module0x000F9711_Objects.h" //reference Module 'Empty Slot' objects


#ifndef _VRQX__EC_OBJECTS_H_
/******************************************************************************
*                    Defines
******************************************************************************/


#define MODULE_OBJECT_INCREMENT 16 /**< \brief Increment for Module object with the index between 0x2000 and 0xBFFF*/
#define MODULE_PDO_OBJECT_INCREMENT 1 /**< \brief Increment for Module object with the index from 0x1600 to 0x17FF and from 0x1A00 to 0x1BFF*/
#endif /*#ifndef _VRQX__EC_OBJECTS_H_*/


#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
#define PROTO
#else
#define PROTO extern
#endif
/******************************************************************************
*                    Object 0x1C12 : SyncManager 2 assignment
******************************************************************************/
/**
* \addtogroup 0x1C12 0x1C12 | SyncManager 2 assignment
* @{
* \brief Object 0x1C12 (SyncManager 2 assignment) definition
*/
#ifdef _OBJD_
/**
* \brief Entry descriptions<br>
* 
* Subindex 0<br>
* Subindex 1 - n (the same entry description is used)<br>
*/
OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0x1C12[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ }};

/**
* \brief Object name definition<br>
* For Subindex 1 to n the syntax 'Subindex XXX' is used
*/
OBJCONST UCHAR OBJMEM aName0x1C12[] = "SyncManager 2 assignment\000\377";
#endif //#ifdef _OBJD_

#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Object structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT16   u16SubIndex0;  /**< \brief Subindex 0 */
UINT16 aEntries[75];  /**< \brief Subindex 1 - 75 */
} OBJ_STRUCT_PACKED_END
TOBJ1C12;
#endif //#ifndef _VRQX__EC_OBJECTS_H_

/**
* \brief Object variable
*/
PROTO TOBJ1C12 sRxPDOassign
#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
={0,{0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}}
#endif
;
/** @}*/



/******************************************************************************
*                    Object 0x1C13 : SyncManager 3 assignment
******************************************************************************/
/**
* \addtogroup 0x1C13 0x1C13 | SyncManager 3 assignment
* @{
* \brief Object 0x1C13 (SyncManager 3 assignment) definition
*/
#ifdef _OBJD_
/**
* \brief Entry descriptions<br>
* 
* Subindex 0<br>
* Subindex 1 - n (the same entry description is used)<br>
*/
OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0x1C13[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ }};

/**
* \brief Object name definition<br>
* For Subindex 1 to n the syntax 'Subindex XXX' is used
*/
OBJCONST UCHAR OBJMEM aName0x1C13[] = "SyncManager 3 assignment\000\377";
#endif //#ifdef _OBJD_

#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Object structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT16   u16SubIndex0;  /**< \brief Subindex 0 */
UINT16 aEntries[75];  /**< \brief Subindex 1 - 75 */
} OBJ_STRUCT_PACKED_END
TOBJ1C13;
#endif //#ifndef _VRQX__EC_OBJECTS_H_

/**
* \brief Object variable
*/
PROTO TOBJ1C13 sTxPDOassign
#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
={75,{0x1A00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}}
#endif
;
/** @}*/



/******************************************************************************
*                    Object 0xF000 : Modular Device Profile
******************************************************************************/
/**
* \addtogroup 0xF000 0xF000 | Modular Device Profile
* @{
* \brief Object 0xF000 (Modular Device Profile) definition
*/
#ifdef _OBJD_
/**
* \brief Object entry descriptions<br>
* <br>
* SubIndex 0<br>
* SubIndex 1 - Index distance <br>
* SubIndex 2 - Maximum number of modules <br>
*/
OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0xF000[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ }, /* Subindex1 - Index distance  */
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ }}; /* Subindex2 - Maximum number of modules  */

/**
* \brief Object/Entry names
*/
OBJCONST UCHAR OBJMEM aName0xF000[] = "Modular Device Profile\000"
"Index distance \000"
"Maximum number of modules \000\377";
#endif //#ifdef _OBJD_

#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Object structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT16 u16SubIndex0;
UINT16 IndexDistance; /* Subindex1 - Index distance  */
UINT16 MaximumNumberOfModules; /* Subindex2 - Maximum number of modules  */
} OBJ_STRUCT_PACKED_END
TOBJF000;
#endif //#ifndef _VRQX__EC_OBJECTS_H_

/**
* \brief Object variable
*/
PROTO TOBJF000 ModularDeviceProfile0xF000
#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
={2,0x0010,0x004B}
#endif
;
/** @}*/



/******************************************************************************
*                    Object 0xF030 : Configured Module Ident List
******************************************************************************/
/**
* \addtogroup 0xF030 0xF030 | Configured Module Ident List
* @{
* \brief Object 0xF030 (Configured Module Ident List) definition
*/
#ifdef _OBJD_
/**
* \brief Entry descriptions<br>
* 
* Subindex 0<br>
* Subindex 1 - n (the same entry description is used)<br>
*/
OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0xF030[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READWRITE },
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READWRITE }};

/**
* \brief Object name definition<br>
* For Subindex 1 to n the syntax 'Subindex XXX' is used
*/
OBJCONST UCHAR OBJMEM aName0xF030[] = "Configured Module Ident List\000\377";
#endif //#ifdef _OBJD_

#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Object structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT16   u16SubIndex0;  /**< \brief Subindex 0 */
UINT32 aEntries[75];  /**< \brief Subindex 1 - 75 */
} OBJ_STRUCT_PACKED_END
TOBJF030;
#endif //#ifndef _VRQX__EC_OBJECTS_H_

/**
* \brief Object variable
*/
PROTO TOBJF030 ConfiguredModuleIdentList0xF030
#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
={75,{0x000F9701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
#endif
;
/** @}*/



/******************************************************************************
*                    Object 0xF050 : Detected Module ident List
******************************************************************************/
/**
* \addtogroup 0xF050 0xF050 | Detected Module ident List
* @{
* \brief Object 0xF050 (Detected Module ident List) definition
*/
#ifdef _OBJD_
/**
* \brief Entry descriptions<br>
* 
* Subindex 0<br>
* Subindex 1 - n (the same entry description is used)<br>
*/
OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0xF050[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }};

/**
* \brief Object name definition<br>
* For Subindex 1 to n the syntax 'Subindex XXX' is used
*/
OBJCONST UCHAR OBJMEM aName0xF050[] = "Detected Module ident List\000\377";
#endif //#ifdef _OBJD_

#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Object structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT16   u16SubIndex0;  /**< \brief Subindex 0 */
UINT32 aEntries[75];  /**< \brief Subindex 1 - 75 */
} OBJ_STRUCT_PACKED_END
TOBJF050;
#endif //#ifndef _VRQX__EC_OBJECTS_H_

/**
* \brief Object variable
*/
PROTO TOBJF050 DetectedModuleIdentList0xF050
#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
={75,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
#endif
;
/** @}*/



/******************************************************************************
*                    Object 0xF900 : System Information
******************************************************************************/
/**
* \addtogroup 0xF900 0xF900 | System Information
* @{
* \brief Object 0xF900 (System Information) definition
*/
#ifdef _OBJD_
/**
* \brief Object entry descriptions<br>
* <br>
* SubIndex 0<br>
* SubIndex 1 - ModuleDiscoveryStatus<br>
* SubIndex 2 - DiscoveredIOModulesCnt<br>
* SubIndex 3 - DiscoveredPressureZoneCnt<br>
* SubIndex 4 - DiscoveredExternalPropPressureZoneCnt<br>
*/
OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0xF900[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED8 , 0x08 , ACCESS_READ }, /* Subindex1 - ModuleDiscoveryStatus */
{ DEFTYPE_UNSIGNED8 , 0x08 , ACCESS_READ }, /* Subindex2 - DiscoveredIOModulesCnt */
{ DEFTYPE_UNSIGNED8 , 0x08 , ACCESS_READ }, /* Subindex3 - DiscoveredPressureZoneCnt */
{ DEFTYPE_UNSIGNED8 , 0x08 , ACCESS_READ }}; /* Subindex4 - DiscoveredExternalPropPressureZoneCnt */

/**
* \brief Object/Entry names
*/
OBJCONST UCHAR OBJMEM aName0xF900[] = "System Information\000"
"ModuleDiscoveryStatus\000"
"DiscoveredIOModulesCnt\000"
"DiscoveredPressureZoneCnt\000"
"DiscoveredExternalPropPressureZoneCnt\000\377";
#endif //#ifdef _OBJD_

#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Object structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT16 u16SubIndex0;
UINT8 ModuleDiscoveryStatus; /* Subindex1 - ModuleDiscoveryStatus */
UINT8 DiscoveredIOModulesCnt; /* Subindex2 - DiscoveredIOModulesCnt */
UINT8 DiscoveredPressureZoneCnt; /* Subindex3 - DiscoveredPressureZoneCnt */
UINT8 DiscoveredExternalPropPressureZoneCnt; /* Subindex4 - DiscoveredExternalPropPressureZoneCnt */
} OBJ_STRUCT_PACKED_END
TOBJF900;
#endif //#ifndef _VRQX__EC_OBJECTS_H_

/**
* \brief Object variable
*/
PROTO TOBJF900 SystemInformation0xF900
#if defined(_VRQX__EC_) && (_VRQX__EC_ == 1)
={4,0xFF,0x00,0x00,0x00}
#endif
;
/** @}*/





PROTO UINT8 SystemInformationRead(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess);
PROTO UINT8 ModuleF9701_MBNOperationalRead(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess);
PROTO UINT8 ModuleF9701_MBNInformationRead(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess);
PROTO UINT8 ModuleF9701_MBNDiagnosticsRead(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess);


/******************************************************************************
*                    Reference to module object dictionaries
******************************************************************************/
#ifndef _VRQX__EC_OBJECTS_H_
/**
* \brief Module object dictionary reference structure
*/
typedef struct OBJ_STRUCT_PACKED_START {
UINT32 u32ModuleId;
TOBJECT OBJMEM * pObjectDictionary;
} OBJ_STRUCT_PACKED_END
TMODULEODREF;
#endif //#ifndef _VRQX__EC_OBJECTS_H_


#ifdef _OBJD_
TMODULEODREF ModuleOds[1] ={{0xF9701,Module000F9701ObjDic}};
#else
extern TMODULEODREF ModuleOds[1];
#endif /*#ifdef else _OBJD_*/



PROTO TMODULEODREF AssignedModules[75];

#ifdef _OBJD_
TOBJECT    OBJMEM ApplicationObjDic[] = {
/* Object 0x1C12 */
{NULL , NULL ,  0x1C12 , {DEFTYPE_UNSIGNED16 , 75 | (OBJCODE_ARR << 8)} , asEntryDesc0x1C12 , aName0x1C12 , &sRxPDOassign , NULL , NULL , 0x0000 },
/* Object 0x1C13 */
{NULL , NULL ,  0x1C13 , {DEFTYPE_UNSIGNED16 , 75 | (OBJCODE_ARR << 8)} , asEntryDesc0x1C13 , aName0x1C13 , &sTxPDOassign , NULL , NULL , 0x0000 },
/* Object 0xF000 */
{NULL , NULL ,  0xF000 , {DEFTYPE_RECORD , 2 | (OBJCODE_REC << 8)} , asEntryDesc0xF000 , aName0xF000 , &ModularDeviceProfile0xF000 , NULL , NULL , 0x0000 },
/* Object 0xF030 */
{NULL , NULL ,  0xF030 , {DEFTYPE_UNSIGNED32 , 75 | (OBJCODE_ARR << 8)} , asEntryDesc0xF030 , aName0xF030 , &ConfiguredModuleIdentList0xF030 , NULL , NULL , 0x0000 },
/* Object 0xF050 */
{NULL , NULL ,  0xF050 , {DEFTYPE_UNSIGNED32 , 75 | (OBJCODE_ARR << 8)} , asEntryDesc0xF050 , aName0xF050 , &DetectedModuleIdentList0xF050 , NULL , NULL , 0x0000 },
/* Object 0xF900 */
{NULL , NULL ,  0xF900 , {DEFTYPE_RECORD , 4 | (OBJCODE_REC << 8)} , asEntryDesc0xF900 , aName0xF900 , &SystemInformation0xF900 , SystemInformationRead , NULL , 0x0000 },
{NULL,NULL, 0xFFFF, {0, 0}, NULL, NULL, NULL, NULL}};
#endif    //#ifdef _OBJD_

#undef PROTO

/** @}*/
#define _VRQX__EC_OBJECTS_H_
