GDCM  2.2.6
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 {
34  eSta1Idle = 1,
35  eSta2Open = 2,
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;
63  return 2;
65  return 3;
67  return 4;
68  case eSta6TransferReady:
69  return 5;
70  case eSta7WaitRelease:
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
Definition: gdcmNetworkStateID.h:44
Definition: gdcmNetworkStateID.h:43
EStateID
Definition: gdcmNetworkStateID.h:32
Definition: gdcmNetworkStateID.h:45
Definition: gdcmNetworkStateID.h:37
Definition: gdcmNetworkStateID.h:42
const int cMaxStateID
Definition: gdcmNetworkStateID.h:49
Definition: gdcmNetworkStateID.h:41
int GetStateIndex(EStateID inState)
Definition: gdcmNetworkStateID.h:53
Definition: gdcmNetworkStateID.h:36
Definition: gdcmNetworkStateID.h:38
Definition: gdcmNetworkStateID.h:35
Definition: gdcmNetworkStateID.h:46
Definition: gdcmNetworkStateID.h:40
Definition: gdcmNetworkStateID.h:39
Definition: gdcmNetworkStateID.h:33
Definition: gdcmNetworkStateID.h:34

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo