©
HUGHES NETWORK SYSTEMS
,
7$%/(2)&217(176
Acknowledgments...................................................................................................................................................0
TABLE OF CONTENTS...........................................................................................................................................I
THE ADAPTIVE COMMUNICATION ENVIRONMENT................................................................................1
T
HE
ACE A
RCHITECTURE
..........................................................................................................................................1
The OS Adaptation Layer.......................................................................................................................................2The C++ wrappers layer.......................................................................................................................................3The ACE Framework Components.......................................................................................................................4
IPC SAP..........................................................................................................................................................................6
C
ATEGORIES OF CLASSES IN
IPC SAP........................................................................................................................6T
HE
S
OCKETS
C
LASS
C
ATEGORY
(ACE_SOCK)......................................................................................................7
Using Streams in ACE............................................................................................................................................8Using Datagrams in ACE....................................................................................................................................12Using Multicast with ACE...................................................................................................................................15
MEMORY MANAGEMENT..................................................................................................................................19
A
LLOCATORS
.............................................................................................................................................................20
Using the Cached Allocator.................................................................................................................................20
ACE_M
ALLOC
..........................................................................................................................................................23
How ACE_Malloc works.....................................................................................................................................24Using ACE_Malloc..............................................................................................................................................25
U
SING THE
M
ALLOC CLASSES WITH THE
A
LLOCATOR INTERFACE
.........................................................................28
THREAD MANAGEMENT.....................................................................................................................................29
C
REATING AND CANCELING THREADS
......................................................................................................................29S
YNCHRONIZATION PRIMITIVES IN
ACE..................................................................................................................32
The ACE Locks Category.....................................................................................................................................32
Using the Mutex classes........................................................................................................................................................33Using the Lock and Lock Adapter for dynamic binding.....................................................................................................35Using Tokens.........................................................................................................................................................................37
The ACE Guards Category..................................................................................................................................38The ACE Conditions Category............................................................................................................................40 Miscellaneous Synchronization Classes..............................................................................................................43
Barriers in ACE.....................................................................................................................................................................43Atomic Op.............................................................................................................................................................................44
T
HREAD
M
ANAGEMENT WITH THE
ACE_T
HREAD
_M
ANAGER
................................................................................46T
HREAD
S
PECIFIC
S
TORAGE
.....................................................................................................................................49
TASKS AND ACTIVE OBJECTS..........................................................................................................................52
A
CTIVE
O
BJECTS
.......................................................................................................................................................52ACE_T
ASK
................................................................................................................................................................53
Structure of a Task................................................................................................................................................53Creating and using a Task...................................................................................................................................54Communication between tasks.............................................................................................................................55
T
HE
A
CTIVE
O
BJECT
P
ATTERN
.................................................................................................................................58
How the Active Object Pattern Works.................................................................................................................58
Leave a Comment