N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/OrbisQuartus/shared/virtual_time.h File Reference

Virtual Time implementation. More...

#include <stdio.h>
#include <string.h>
#include <comparable.h>

Go to the source code of this file.

Classes

class  VT_timestamp
class  VT_message

Defines

#define VT_PORT   3486
#define MICRO   1000000
#define MAX_ULONG   2147483647L

Enumerations

enum  VT_msg_sign { POSITIVE, NEGATIVE }
enum  VT_msg_q { IN, OUT }

Functions

VT_timestamp global_virtual_time ()
VT_timestamp local_virtual_time ()
int checkpoint (unsigned long node_id)
int chkpt_all (void)
int restore (unsigned long node_id)


Detailed Description

Virtual Time implementation.

Revision
1.13

Original Author: Sean M. Brennan <brennan@lanl.gov>

Author
sean_m_brennan

Created: October 23, 2006

Date
2007/10/11 17:13:34

Definition in file virtual_time.h.


Define Documentation

#define MAX_ULONG   2147483647L
 

Definition at line 52 of file virtual_time.h.

Referenced by VT_timestamp::max(), and VT_timestamp::operator++().

#define MICRO   1000000
 

Definition at line 49 of file virtual_time.h.

Referenced by VT_timestamp::operator+(), and VT_timestamp::operator++().

#define VT_PORT   3486
 

Definition at line 43 of file virtual_time.h.

Referenced by virtual_time_server().


Enumeration Type Documentation

enum VT_msg_q
 

Enumerator:
IN 
OUT 

Definition at line 47 of file virtual_time.h.

enum VT_msg_sign
 

Enumerator:
POSITIVE 
NEGATIVE 

Definition at line 46 of file virtual_time.h.


Function Documentation

int checkpoint unsigned long  node_id  ) 
 

Todo:
FIXME: manage vt message queues

FIXME: store disk snapshot

Definition at line 97 of file virtual_time.cpp.

References OrbisQuartus::cfg, AVL_node< Key >::elt(), error, AVL_tree< Key >::find(), Configuration::get_nodes(), oq, Sensor_node::pause(), Sensor_node::save(), and Sensor_node::unpause().

Referenced by chkpt_all().

int chkpt_all void   ) 
 

Definition at line 118 of file virtual_time.cpp.

References checkpoint(), error, OrbisQuartus::get_assignment(), and oq.

VT_timestamp global_virtual_time  ) 
 

Definition at line 198 of file virtual_time.h.

References VT_timestamp::global_vt().

Referenced by vt_recv().

VT_timestamp local_virtual_time void   ) 
 

Definition at line 203 of file virtual_time.h.

References VT_timestamp::local_vt().

int restore unsigned long  node_id  ) 
 

Todo:
FIXME: restore from chkpt

Definition at line 135 of file virtual_time.cpp.

References error.


© 2007, Los Alamos National Security, LLC.