
#include "define.h"
#include "AudioConsoleInterface.h"
#include "WiFiCtrl.h"
#include "NetworkProtocol.h"
#include "ProtocolDefs.h"
#include "timer.h"
#include <stdio.h>


void AudioConsoleIFExecuteMasterCommand(int SenderID, int Command, unsigned char *Data, int DataSize)
{
    
    switch(Command)
    {
        case AV_RECEIVER_INTERFACE_ACK:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_GENERAL_STATUS_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_MAIN_POWER_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_ZONE2_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_MAIN_ZONE_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_SPEAKERS_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SELECT_SCENE_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_MAIN_VOLUME_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_ZONE2_VOLUME_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_ZONE2_INPUT_RESPONSE:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_SET_SYNC_Z2_WITH_Z1_RESPONSE:
        {
            break;
        }
        case ETH_NETWK_DEVICE_INFO_REQUEST:
        {
            char data[2];
            data[0] = ID_AVRECEIVER_CONSOLE_INTERFACE;
            data[1] = MY_DEVICE_ADDRESS;
            int PayloadSize;
            unsigned char *response = ProtocolGetFrame(ID_MASTER,MASTER_ADDRESS,ID_ETHERNET_VIRTUAL,ETH_NETWK_DEVICE_INFO_RESPONSE, data,2,0, &PayloadSize);
            SendAudioInterfaceData((char*)response,PayloadSize);
            
            break;
        }
        case ETH_NETWK_SET_DEVICE_INFO_ACK:
        {
            //                    LTENetworInterfaceExecSM(LTE_NWI_MASTER_CONNECTED_EVENT);
            break;
        }
        case ETH_NETWK_CONNECTION_REFUSED:
        {
            break;
        }
        case AV_RECEIVER_INTERFACE_GENERAL_STATUS_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_MAIN_POWER_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_ZONE2_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_MAIN_ZONE_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_SPEAKERS_REQUEST:
        case AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_REQUEST:
        case AV_RECEIVER_INTERFACE_SELECT_SCENE_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_MAIN_VOLUME_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_ZONE2_VOLUME_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_ZONE2_INPUT_REQUEST:
        case AV_RECEIVER_INTERFACE_SET_SYNC_Z2_WITH_Z1_REQUEST:
            
        default:
        {
            
        }
    }
}