GDCM 3.0.24
gdcmNetworkStateID.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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
21namespace gdcm {
22 namespace network {
23
48
49 const int cMaxStateID = 13;
50
51 //the transition table is built on state indices
52 //this function will produce the index from the power-of-two EStateID
53 inline int GetStateIndex(EStateID inState){
54 switch (inState){
56 default:
57 return -1;
58 case eSta1Idle:
59 return 0;
60 case eSta2Open:
61 return 1;
63 return 2;
65 return 3;
67 return 4;
69 return 5;
71 return 6;
73 return 7;
75 return 8;
77 return 9;
79 return 10;
81 return 11;
83 return 12;
84 }
85 }
86 }
87}
88
89#endif //GDCMNETWORKSTATEID_H
const int cMaxStateID
Definition gdcmNetworkStateID.h:49
EStateID
Definition gdcmNetworkStateID.h:32
@ eSta10ReleaseCollisionAc
Definition gdcmNetworkStateID.h:43
@ eSta5WaitRemoteAssoc
Definition gdcmNetworkStateID.h:38
@ eSta13AwaitingClose
Definition gdcmNetworkStateID.h:46
@ eSta3WaitLocalAssoc
Definition gdcmNetworkStateID.h:36
@ eSta4LocalAssocDone
Definition gdcmNetworkStateID.h:37
@ eSta1Idle
Definition gdcmNetworkStateID.h:34
@ eSta7WaitRelease
Definition gdcmNetworkStateID.h:40
@ eSta8WaitLocalRelease
Definition gdcmNetworkStateID.h:41
@ eStaDoesNotExist
Definition gdcmNetworkStateID.h:33
@ eSta2Open
Definition gdcmNetworkStateID.h:35
@ eSta6TransferReady
Definition gdcmNetworkStateID.h:39
@ eSta11ReleaseCollisionRq
Definition gdcmNetworkStateID.h:44
@ eSta12ReleaseCollisionAcLocal
Definition gdcmNetworkStateID.h:45
@ eSta9ReleaseCollisionRqLocal
Definition gdcmNetworkStateID.h:42
int GetStateIndex(EStateID inState)
Definition gdcmNetworkStateID.h:53
Definition gdcmASN1.h:21