/*
 * app_thermostat_msp_commands.h
 *
 *  Created on: 15.05.2017
 *      Author: j.huebner
 */

#ifndef THERMOSTAT_SOURCE_APP_THERMOSTAT_MSP_COMMANDS_H_
#define THERMOSTAT_SOURCE_APP_THERMOSTAT_MSP_COMMANDS_H_

/****************************************************************************/
/***        Include files                                                 ***/
/****************************************************************************/
#include <jendefs.h>
#include <string.h>
#include "zps_gen.h"
#include "App_Thermostat.h"
/****************************************************************************/
/***        Macro Definitions                                             ***/
/****************************************************************************/
#define SWITCHPOINT_MONTAG 		0
#define SWITCHPOINT_DIENSTAG 	6
#define SWITCHPOINT_MITTWOCH 	12
#define SWITCHPOINT_DONNERSTAG 	18
#define SWITCHPOINT_FREITAG 	24
#define SWITCHPOINT_SAMSTAG 	30
#define SWITCHPOINT_SONNTAG		36
/****************************************************************************/
/***        Type Definitions                                              ***/
/****************************************************************************/
/****************************************************************************/
/***        Local Function Prototypes                                     ***/
/****************************************************************************/
/****************************************************************************/
/***        Exported Variables                                            ***/
/****************************************************************************/
extern PUBLIC uint8 u8decodedSwitchpointsArray[113];
PUBLIC uint8 u8TransactionSequenceNumber;
/****************************************************************************/
/***        Local Variables                                               ***/
/****************************************************************************/
/****************************************************************************/
/***        Exported Functions                                            ***/
/****************************************************************************/
#ifdef THERMOSTAT_CLIENT

PUBLIC teZCL_Status eCLD_Thermostat_SetHostHolidayPayloadSend(
                    uint8                                    u8SourceEndPointId,
                    uint8                                    u8DestinationEndPointId,
                    tsZCL_Address                            *psDestinationAddress,
                    uint8                                    *pu8TransactionSequenceNumber,
					tsCLD_Thermostat_SetHostHolidayPayload   *psPayload);

PUBLIC teZCL_Status eCLD_ThermostatCommandHostSchedulePayloadSend(
                    uint8                                   u8SourceEndPointId,
                    uint8                                   u8DestinationEndPointId,
                    tsZCL_Address                           *psDestinationAddress,
                    uint8                                   *pu8TransactionSequenceNumber,
					tsCLD_Thermostat_HostSchedulePayload   	*psPayload);
#endif

#ifdef THERMOSTAT_SERVER

PUBLIC teZCL_Status eCLD_ThermostatCommandHostScheduleReceive(
                    ZPS_tsAfEvent                   		*pZPSevent,
                    uint8                             		*pu8TransactionSequenceNumber,
                    tsCLD_Thermostat_HostSchedulePayload    *psPayload);

PUBLIC  teZCL_Status eCLD_ThermostatHandleSetHostSchedule(
                     ZPS_tsAfEvent               			*pZPSevent,
                     tsZCL_EndPointDefinition    			*psEndPointDefinition,
                     tsZCL_ClusterInstance       			*psClusterInstance);

PUBLIC teZCL_Status eCLD_ThermostatCommandSetHostHolidayReceive(
                    ZPS_tsAfEvent                             *pZPSevent,
                    uint8                                     *pu8TransactionSequenceNumber,
					tsCLD_Thermostat_SetHostHolidayPayload    *psPayload);


PUBLIC teZCL_Status eCLD_ThermostatHandleSetHostHoliday(
                    ZPS_tsAfEvent               			*pZPSevent,
                    tsZCL_EndPointDefinition    			*psEndPointDefinition,
                    tsZCL_ClusterInstance       			*psClusterInstance);

PUBLIC  teZCL_Status eCLD_ThermostatHandleGetHostSchedule(
                     ZPS_tsAfEvent               			*pZPSevent,
                     tsZCL_EndPointDefinition    			*psEndPointDefinition,
                     tsZCL_ClusterInstance       			*psClusterInstance);

#endif
/****************************************************************************/
/***        END OF FILE                                                   ***/
/****************************************************************************/
#endif /* THERMOSTAT_SOURCE_APP_THERMOSTAT_MSP_COMMANDS_H_ */
