File MM7.h

-

CONTENTS
Home

TECHNOLOGY
Message IDs
Layer-2 Driver
MM2.h
Layer-7 API
MM7.h

 
/**************************************************************************
MODULE:    MM7
CONTAINS:  MicroMessaging Layer 7 API Definitions
COPYRIGHT: Embedded Systems Academy, Inc. 2003
           See www.MicroMessaging.com
           This software was written in accordance to the guidelines at
           www.esacademy.com/software/softwarestyleguide.pdf
DISCLAIM:  Read and understand our disclaimer before using this code!
           www.esacademy.com/disclaim.htm
LICENSE:   General Public License as specified by GNU
VERSION:   0.75, Pf 23-SEP-03
---------------------------------------------------------------------------
HISTORY:   0.75, Pf 23-SEP-03, First Published Version
***************************************************************************/ 

#include "MM2.h"

// Definition of the process image that holds all process data.
// Default size is 32 bytes (4x8)
BYTE gProcImg[32];


/**************************************************************************
GLOBAL FUNCTIONS
**************************************************************************/

/**************************************************************************
DOES:    Initializes the MicroMessaging protocol stack.
RETURNS: TRUE, if initialization executed OK.
         FALSE, if initialization failed.
**************************************************************************/
BYTE MM7_Init
  (
  BYTE NodeID,   // MicroMessaging Node ID (1 to 31)
  WORD BitRate,  // Desired bit rate in 100 bits per second
  WORD HeartRate // Default Heartbeat rate in milliseconds
  );


/**************************************************************************
DOES:    Initializes one of the four data channels available for each node.
RETURNS: TRUE, if initialization executed OK.
         FALSE, if initialization failed.
**************************************************************************/
BYTE MM7_InitDataChannel
  (
  BYTE Channel,   // Channel number (1-4)
  BYTE Direction, // 0 for receive channel, 1 for transmit channel
  WORD EventTime, // Only used for transmit channels: set to 0 if data
                  // to be transmitted on every poll message or set to
                  // number of milliseconds between transfers
  BYTE MessageID, // 0 for default ID or explicit message ID to be used
  BYTE len,       // Number of data bytes in channel (0-8)
  BYTE offset     // Offset in process image
  );


/**************************************************************************
DOES:    Operates the MicroMessaging protocol stack. This function must
         be called frequently in the main while(1) background task.
**************************************************************************/
void MM7_ProcessStack
  (
  void
  );