GDCM
2.2.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
MessageExchangeDefinition
gdcmNetworkStateID.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef GDCMNETWORKSTATEID_H
19
#define GDCMNETWORKSTATEID_H
20
21
namespace
gdcm {
22
namespace
network {
23
32
enum
EStateID
{
33
eStaDoesNotExist
= 0,
34
eSta1Idle
= 1,
35
eSta2Open
= 2,
36
eSta3WaitLocalAssoc
= 4,
37
eSta4LocalAssocDone
= 8,
38
eSta5WaitRemoteAssoc
= 16,
39
eSta6TransferReady
= 32,
40
eSta7WaitRelease
= 64,
41
eSta8WaitLocalRelease
= 128,
42
eSta9ReleaseCollisionRqLocal
= 256,
43
eSta10ReleaseCollisionAc
= 512,
44
eSta11ReleaseCollisionRq
= 1024,
45
eSta12ReleaseCollisionAcLocal
= 2048,
46
eSta13AwaitingClose
= 4096
47
};
48
49
const
int
cMaxStateID
= 13;
50
51
//the transition table is built on state indeces
52
//this function will produce the index from the power-of-two EStateID
53
inline
int
GetStateIndex
(
EStateID
inState){
54
switch
(inState){
55
case
eStaDoesNotExist
:
56
default
:
57
return
-1;
58
case
eSta1Idle
:
59
return
0;
60
case
eSta2Open
:
61
return
1;
62
case
eSta3WaitLocalAssoc
:
63
return
2;
64
case
eSta4LocalAssocDone
:
65
return
3;
66
case
eSta5WaitRemoteAssoc
:
67
return
4;
68
case
eSta6TransferReady
:
69
return
5;
70
case
eSta7WaitRelease
:
71
return
6;
72
case
eSta8WaitLocalRelease
:
73
return
7;
74
case
eSta9ReleaseCollisionRqLocal
:
75
return
8;
76
case
eSta10ReleaseCollisionAc
:
77
return
9;
78
case
eSta11ReleaseCollisionRq
:
79
return
10;
80
case
eSta12ReleaseCollisionAcLocal
:
81
return
11;
82
case
eSta13AwaitingClose
:
83
return
12;
84
}
85
}
86
}
87
}
88
89
#endif //GDCMNETWORKSTATEID_H
Generated on Wed Jun 13 2012 20:40:37 for GDCM by
1.8.1