/*
 * Global_variable.h
 *
 *  Created on: 15-Nov-2023
 *      Author: TECQNIO
 */

#ifndef GLOBAL_VARIABLE_H_
#define GLOBAL_VARIABLE_H_
#include "stdint.h"
#include "stdbool.h"


typedef struct
{
	uint8_t ubDate;
	uint8_t ubMonth;
	uint8_t ubYear;
	uint8_t ubHour;
	uint8_t ubMins;
	uint8_t ubSec;
	uint8_t ubTimeZone;
}T_Time;

typedef struct
{
	uint8_t ubUserID;
	uint8_t ubUserType;
	char chUserName[30];
	bool bFPRgstrd;
	uint8_t ubFPID[5];
	bool bNFCRgstrd;
	uint64_t ulNFCID;
	bool bPINRgstrd;
	uint32_t ulPINVal;
	bool bRmtUnlockRgstrd;
	bool bTmpOTPRgstrd;
	uint8_t ubOccupancyStatus;
	uint32_t ulTemporaryOTP;
	bool bMobileAppAccess;
	bool bTimeboundAccess;
	T_Time stPassModeStartTime;
	T_Time stPassModeEndTime;
	T_Time stPrivModeStartTime;
	T_Time stPrivModeEndTime;
	T_Time stEntryTime;
	T_Time stExitTime;
}T_UserData;




typedef struct
{
	uint32_t ulLockID;
	char  chDoorName[30];
	uint8_t ubNumUsers;
	T_UserData stUserData[100];
	uint8_t ubWifiStatus;
	uint8_t ubBLEStatus;
	uint8_t ubOpMode;
	uint8_t ubBellPress;
	uint32_t ulCurrentPIN;
	uint64_t ulNFCID;
	bool bTempOTPOrPin;
	uint32_t ulPINRecevied;
	uint32_t ulRmtUnLockReceived;
	uint8_t ubFPIdReceived;
	uint8_t ubPrivModeSwStatus;
	uint8_t ubFactoryResetSwStatus;
	uint8_t ubIntrusionSwStatus;
	bool bDoorLockStatus;
	bool bDoorClosedStatus;
	uint8_t ubBatteryLevel;
	uint32_t ulErrorStatus;
}T_LockData;







#endif /* GLOBAL_VARIABLE_H_ */
