Important MPS messages can arrive in bursts of about 200 per second!

  1. #Setup
    1. #Environment
    2. #Dependencies
    3. #Test inside Eclipse
  2. #Development
    1. #Overview
    2. #Launch Script
    3. #Classes and Functions
      1. #Message
      2. #Other
  3. #Release
    1. #Start/Stop
  4. #Troubleshoot

Setup

Environment

Dependencies

For library paths, see the build.xml file. Note that the dependent jar files are copied into the lib folder and are part of CVS. To update the jar files, run ant update_dependencies. This should copy the files from $PHYSICS_TOP on dev onto the lib folder. You can then commit these updated dependent jar files into CVS.

Test

Development

Overview

Launch Script

Classes and Functions

Message

edu.stanford.slac.mpshist.message.Message
///****************************************************************************
// * Data Pointers
// ****************************************************************************/
///* Note: The history message header begins at the first byte of TCP Data
// */
// 
//#define HISTORY_MESSAGE_HEADER_SECTION_POINTER(_pointerToFullMessage)      ((epicsInt8  *)(_pointerToFullMessage)   + 0)
//#define HISTORY_MESSAGE_PROTOCOL_VERSION_POINTER(_pointerToHistoryHeader)  ((epicsUInt8 *)(_pointerToHistoryHeader) + 0)
//#define HISTORY_MESSAGE_TYPE_POINTER(_pointerToHistoryHeader)              ((epicsUInt8 *)(_pointerToHistoryHeader) + 1)
//#define HISTORY_MESSAGE_DATA_SECTION_POINTER(_pointerToHistoryHeader)      ((epicsInt8  *)(_pointerToHistoryHeader) + 2)
//
//#define HISTORY_MESSAGE_PROTOCOL_VERSION(_pointerToHistoryHeader)          (*HISTORY_MESSAGE_PROTOCOL_VERSION_POINTER(_pointerToHistoryHeader))
//#define HISTORY_MESSAGE_TYPE(_pointerToHistoryHeader)                      (*HISTORY_MESSAGE_TYPE_POINTER(_pointerToHistoryHeader))
//
///****************************************************************************
// * Super Message
// ****************************************************************************/
///* All history message struct data.
// */
//
//
//
//#define HISTORY_SUPER_MESSAGE_SIZE                                           (16 + MPSHistoryProtocolHeaderSize)
//
//#define HISTORY_SUPER_TIMESTAMP_SECPASTEPOCH_POINTER(_pointerToHistoryData)  ((epicsUInt32 *)((_pointerToHistoryData) +  0))
//#define HISTORY_SUPER_TIMESTAMP_NSEC_PULSEID_POINTER(_pointerToHistoryData)  ((epicsUInt32 *)((_pointerToHistoryData) +  4))
//#define HISTORY_SUPER_TIMESLOT_POINTER(_pointerToHistoryData)                ((epicsUInt8  *)((_pointerToHistoryData) +  8))
//#define HISTORY_SUPER_TYPE_POINTER(_pointerToHistoryData)                    ((epicsUInt8  *)((_pointerToHistoryData) +  9))
//#define HISTORY_SUPER_ID_POINTER(_pointerToHistoryData)                      ((epicsUInt32 *)((_pointerToHistoryData) + 10))
//#define HISTORY_SUPER_OLD_VALUE_POINTER(_pointerToHistoryData)               ((epicsUInt32 *)((_pointerToHistoryData) + 14))
//#define HISTORY_SUPER_NEW_VALUE_POINTER(_pointerToHistoryData)               ((epicsUInt32 *)((_pointerToHistoryData) + 18))
//
//#define HISTORY_SUPER_TIMESTAMP_SECPASTEPOCH(_pointerToHistoryData)          (*HISTORY_SUPER_TIMESTAMP_SECPASTEPOCH_POINTER(_pointerToHistoryData))
//#define HISTORY_SUPER_TIMESTAMP_NSEC_PULSEID(_pointerToHistoryData)          (*HISTORY_SUPER_TIMESTAMP_NSEC_PULSEID_POINTER(_pointerToHistoryData))
//#define HISTORY_SUPER_TIMESLOT(_pointerToHistoryData)                        (*HISTORY_SUPER_TIMESLOT_POINTER(_pointerToHistoryData))
//#define HISTORY_SUPER_TYPE(_pointerToHistoryData)                            (*HISTORY_SUPER_TYPE_POINTER(_pointerToHistoryData))
//#define HISTORY_SUPER_ID(_pointerToHistoryData)                              (*HISTORY_SUPER_ID_POINTER(_pointerToHistoryData))
//#define HISTORY_SUPER_OLD_VALUE(_pointerToHistoryData)                       (*HISTORY_SUPER_OLD_VALUE_POINTER(_pointerToHistoryData))
//#define HISTORY_SUPER_NEW_VALUE(_pointerToHistoryData)                       (*HISTORY_SUPER_NEW_VALUE_POINTER(_pointerToHistoryData))
edu.stanford.slac.mpshist.message.MessageRepository

Other

edu.stanford.slac.mpshist.MessageCounter
edu.stanford.slac.mpshist.MessageExporter

edu.stanford.slac.mpshist.MessageServer
edu.stanford.slac.mpshist.MpsHistManager
edu.stanford.slac.mpshist.MpsHistProperties
edu.stanford.slac.mpshist.ServerNotifier

Release

Start / Stop

Troubleshoot

Log files

Cmlog

Is the server running?

Is the server working?

Reboot

References

http://java.sun.com/docs/books/tutorial/networking/ (esp. sockets and datagrams)
http://darksleep.com/player/JavaAndUnsignedTypes.html (java types from/to bytes)
MPS Fault Logging Statistic Reports