//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / MTP3 protocol 
//
//File: mtp3defs.h
//
//Version: $Revision: 1.11 $
//
//State: $State: OCTOBER_97_SNAPSHOT $
//
//Date: $Date: 1997/08/04 10:07:05 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Petteri Koponen
//
//Description:
//      This file contains MTP3-specific constant and type definitions.
//
//Copyright:
//
//
//Licence:
//
//
//History:

#ifndef __MTP3DEFS_H__
#define __MTP3DEFS_H__

//
//Encoding offsets. These offsets tell the position of specific fields inside
//the MTP3 PDU.
//
const unsigned long MTP3_SERVICE_INDICATOR_OFFSET = 0;
const unsigned long MTP3_DESTINATION_POINT_CODE_OFFSET = 1;
const unsigned long MTP3_SIGNALLING_LINK_SELECTION_OFFSET = 4;
const unsigned long MTP3_HEADING_CODE_OFFSET = 5;

//
//Codes for logical AND, OR etc. operations. Eg. MTP_3_BITS = 00000111.
//  
const unsigned long MTP3_1_BITS  = 0x1;
const unsigned long MTP3_2_BITS  = 0x3;
const unsigned long MTP3_3_BITS  = 0x7;
const unsigned long MTP3_4_BITS  = 0xF;
const unsigned long MTP3_5_BITS  = 0x1F;
const unsigned long MTP3_6_BITS  = 0x3F;
const unsigned long MTP3_7_BITS  = 0x7F;
const unsigned long MTP3_8_BITS  = 0xFF;
const unsigned long MTP3_14_BITS = 0xFFF;

//
// general status types
//

const unsigned long MTP3_CODING_OK              = 0;
const unsigned long MTP3_CODING_UNDEFINED       = 1;
const unsigned long MTP3_CODING_FRAME_TOO_SHORT = 2;
const unsigned long MTP3_CODING_FRAME_TOO_LONG  = 3;

//
// field-specific status types
//
const unsigned long MTP3_CODING_UNKNOWN_SERVICE_INDICATOR = 10;
const unsigned long MTP3_CODING_UNKNOWN_NETWORK_INDICATOR = 11;
const unsigned long MTP3_CODING_UNKNOWN_HEADING_CODE      = 12;

#endif // __MTP3DEFS_H__
