Last change
on this file since 141 was
81,
checked in by rosiere, 17 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
802 bytes
|
Line | |
---|
1 | #include "../include/Service_conversion.h" |
---|
2 | |
---|
3 | namespace environment { |
---|
4 | namespace sim2os { |
---|
5 | |
---|
6 | int service2int (service_t num_service) |
---|
7 | { |
---|
8 | return static_cast<int>(num_service); |
---|
9 | } |
---|
10 | |
---|
11 | service_t int2service (int val) |
---|
12 | { |
---|
13 | switch (val) |
---|
14 | { |
---|
15 | case SERVICE_OPEN : return SERVICE_OPEN ; |
---|
16 | case SERVICE_CLOSE : return SERVICE_CLOSE; |
---|
17 | case SERVICE_READ : return SERVICE_READ ; |
---|
18 | case SERVICE_WRITE : return SERVICE_WRITE; |
---|
19 | case SERVICE_TIME : return SERVICE_TIME ; |
---|
20 | case SERVICE_CLOCK : return SERVICE_CLOCK; |
---|
21 | case SERVICE_LSEEK : return SERVICE_LSEEK; |
---|
22 | case SERVICE_UNIMPLEMENTED : return SERVICE_UNIMPLEMENTED; |
---|
23 | default : return SERVICE_UNDEFINED; |
---|
24 | }//end switch |
---|
25 | } |
---|
26 | |
---|
27 | }; |
---|
28 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.