//============================================================================
// Summary  : Reson Type Definition list
// Filename : ResonTypeDefs.h
// Author   : reed@bluefinrobotics.com
// Project  : Data Broadcaster
// Revision : 0.0
// Created  : 2002.04.15
// Modified : 2002.04.15
//============================================================================
// From 6046 Specification (2001.05.31)


#ifndef _RESON6046DATATYPES_H
#define _RESON6046DATATYPES_H


// --- A3.1 Data Types ---
typedef          char      I8;
typedef unsigned char      U8;
typedef unsigned char      BYTE;
typedef          short     I16;
typedef unsigned short     U16;
typedef          int       I32;
typedef unsigned int       U32;
typedef          float     F32;
typedef          double    F64;


// 64 bit integer
struct Integer64
{
    I32 raw[2]; // place for most and least significant parts of the number.
};
typedef Integer64          I64;

// 64 bit unsigned integer
struct UnsignedInteger64
{
    U32 raw[2]; // place for most and least significant halfs of the number.
};
typedef UnsignedInteger64  U64;

// 7K Time Structure
struct _7kTime
{
    U16 year;    // 0 - 65535
    U16 day;     // 1 - 366
    F32 seconds; // 0.000000 - 59.000000
    U8 hours;    // 0 - 32
    U8 minutes;  // 0 - 59
};
typedef struct   _7kTime   T7K;


// Define the size of the structures so they
// don't have to be calculated for each use.
// Sizes are in bytes.
const unsigned int sizeI8 = sizeof(I8);
const unsigned int sizeU8 = sizeof(U8);
const unsigned int sizeBYTE = sizeof(BYTE);
const unsigned int sizeI16 = sizeof(I16);
const unsigned int sizeU16 = sizeof(U16);
const unsigned int sizeI32 = sizeof(I32);
const unsigned int sizeU32 = sizeof(U32);
const unsigned int sizeF32 = sizeof(F32);
const unsigned int sizeF64 = sizeof(F64);
const unsigned int sizeI64 = sizeof(I64);
const unsigned int sizeU64 = sizeof(U64);
const unsigned int sizeT7K = sizeof(T7K);

#endif
