/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTVC1_MSG.h
Copyright (c) 2018 Octasic Inc. All rights reserved.
Description: 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see .
Release: OCTSDR Software Development Kit OCTSDR_GSM-02.11.00-B1927 (2018/04/27)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTVC1_MSG_H__
#define __OCTVC1_MSG_H__
/*****************************  INCLUDE FILES  *******************************/
#include "../octdev_types.h"
#include "octvocnet_pkt.h"
/************************  COMMON DEFINITIONS  *******************************/
/*-------------------------------------------------------------------------------------
 	Message Types
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_TYPE_COMMAND							0		
#define cOCTVC1_MSG_TYPE_RESPONSE							1		
#define cOCTVC1_MSG_TYPE_NOTIFICATION						2		
#define cOCTVC1_MSG_TYPE_SUPERVISORY						7		
#define cOCTVC1_MSG_TYPE_BIT_OFFSET							29		
#define cOCTVC1_MSG_TYPE_BIT_MASK							0x7		
/*-------------------------------------------------------------------------------------
 	Message Resynch
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_RESYNCH_BIT_OFFSET						28		
#define cOCTVC1_MSG_RESYNCH_BIT_MASK						0x1		
/*-------------------------------------------------------------------------------------
 	Message identifier
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_ID_BIT_OFFSET							0		
#define cOCTVC1_MSG_ID_BIT_MASK								0x0FFFFFFF	
/*-------------------------------------------------------------------------------------
 	Message identifier - Method ID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_METHOD_ID_BIT_OFFSET					0		
#define cOCTVC1_MSG_METHOD_BIT_MASK							0x00000FFF	
/*-------------------------------------------------------------------------------------
 	Message identifier - Module ID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_MODULE_ID_BIT_OFFSET					16		
#define cOCTVC1_MSG_MODULE_BIT_MASK							0x0000001F	
/*-------------------------------------------------------------------------------------
 	Message identifier - SUB Module ID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_SUB_MODULE_ID_BIT_OFFSET				21		
#define cOCTVC1_MSG_SUB_MODULE_BIT_MASK						0x00000007	
/*-------------------------------------------------------------------------------------
 	Message identifier - Module and MethodID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_MODULE_AND_METHOD_BIT_MASK				((cOCTVC1_MSG_SUB_MODULE_BIT_MASK<