-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObject.py
More file actions
51 lines (39 loc) · 1.22 KB
/
Object.py
File metadata and controls
51 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- coding: utf-8 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# Object.py ---
# --------------------------------
# Copyright (c) 2011
# Laurent CAPOCCHI
# University of Corsica
# --------------------------------
# Version 3.0 last modified: 05/12/11
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
#
# GENERAL NOTES AND REMARKS:
#
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
#import collections
#Message = collections.namedtuple('Message', 'value time')
class Message:
''' The class Message provide the activation of all DEVS components.
@ivar value:
@type value: None
@type operation: string
'''
###
def __init__(self, v=None, t=None):
'''' Constructor method.
@param v: Value of the transaction
@param t : simulation time
'''
# make local copy
self.value = v
self.time = t
self.name = ""
###
def __str__(self):
''' Printer method.
@return: Object representation.
@rtype: str
'''
return "<< value = %s, time = %s>>"%(self.value, self.time)