Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/TCF Agent Porting Guide.html10
-rw-r--r--docs/TCF Context Identifier Explanation.html2
-rw-r--r--docs/TCF Getting Started.html12
-rw-r--r--docs/TCF Project.html128
-rw-r--r--docs/TCF Service - Breakpoints.html82
-rw-r--r--docs/TCF Service - File System.html166
-rw-r--r--docs/TCF Service - Memory.html172
-rw-r--r--docs/TCF Service - Processes.html170
-rw-r--r--docs/TCF Service - Registers.html154
-rw-r--r--docs/TCF Service - Run Control.html116
-rw-r--r--docs/TCF Service - Stack Trace.html62
-rw-r--r--docs/TCF Service - Streams.html78
-rw-r--r--docs/TCF Service - System Monitor.html290
-rw-r--r--docs/TCF Services.html28
-rw-r--r--docs/TCF Specification.html530
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java10
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java16
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java102
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java40
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java64
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java38
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java38
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java74
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java78
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java56
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java56
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java68
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java166
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java36
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java48
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java92
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java108
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java108
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java26
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java168
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java32
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java32
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java36
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java82
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java52
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java70
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java116
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java38
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPane.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java128
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java26
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java70
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java36
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java6
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java100
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java34
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java26
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/Activator.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/AdapterFactory.java34
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/actions/TcfTerminateCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/launch/LaunchDialogTabGroup.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ExecutableContextLayoutNode.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/LaunchVMProvider.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/RegisterVMProvider.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ViewModelAdapter.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/Activator.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFExecuter.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunch.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchDelegate.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchSequence.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFShutdownSequence.java6
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupDirector.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupParticipant.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFAddress.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFBreakpoints.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFExecutionDMC.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFMemory.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRegisters.java106
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRunControl.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFStack.java70
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java32
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java6
-rw-r--r--plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java38
214 files changed, 3773 insertions, 3781 deletions
diff --git a/docs/TCF Agent Porting Guide.html b/docs/TCF Agent Porting Guide.html
index 57da3c6fd..216afa01a 100644
--- a/docs/TCF Agent Porting Guide.html
+++ b/docs/TCF Agent Porting Guide.html
@@ -61,7 +61,7 @@
Single threaded event driven design provides good level of concurrency (equivalent to cooperative multithreading), while greatly reduces need for synchronization -
each event dispatch cycle can be viewed as fully synchronized atomic operation.
</p>
-
+
<p>
Event driven code should avoid long running or potentially blocking operations in event handlers since they can stop all event processing for indefinite time.
Such operations should use asynchronous APIs (like POSIX Asynchronous I/O), or should be performed by background threads.
@@ -69,7 +69,7 @@
Background thread scope should be limited to a single module and it should not call agent public APIs.
Instead they should communicate with the rest of the code by posting events.
</p>
-
+
<p>
An event is essentially a function pointer (a call-back) that points to event handler, plus a data pointer.
Call-backs are also used throughout the agent code to subscribe listeners for various state change notifications.
@@ -91,7 +91,7 @@
Also, macro values can be overwritten by using -D option in C compiler command line.
Agent <a href='http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/agent/Makefile'>Makefile</a> contains additional logic that makes it even more convenient to build different agent configurations.
</p>
-
+
<p>
It should be much easier to port the agent if you don't need all TCF services.
For example, for RSE integration you only need File System, System Monitor and Processes services,
@@ -130,7 +130,7 @@
When it is not possible or not feasible to use portable POSIX APIs, the agent code contains conditional compilation statements that
use well known macros like WIN32, __CYGWIN__, __MINGW32__, etc. Such places might require editing when porting to a new OS.
</p>
-
+
<h2>
<a name='NewCPU'>Porting TCF Agent to a New CPU Type</a>
</h2>
@@ -138,7 +138,7 @@
<p>
Searching TCF agent source code for __i386__ is a good way to find all places where the source code depends on CPU type.
</p>
-
+
<p>
There are several files in the code that might need changes in order to support a new CPU type:
</p>
diff --git a/docs/TCF Context Identifier Explanation.html b/docs/TCF Context Identifier Explanation.html
index 956c56cf2..fa76450ac 100644
--- a/docs/TCF Context Identifier Explanation.html
+++ b/docs/TCF Context Identifier Explanation.html
@@ -108,7 +108,7 @@ be relatively simple; the information is categorized as follows:</P>
<P CLASS="western">2. Slow changing properties per service, a.k.a.
properties</P>
<P CLASS="western">3. Fast changing properties per service, a.k.a.
-state or status
+state or status
</P>
<P CLASS="western">Category 1 provides a simple way to express
unbounded lists of related contextIds. If such a list becomes too
diff --git a/docs/TCF Getting Started.html b/docs/TCF Getting Started.html
index 6ed3b19a6..ba030da47 100644
--- a/docs/TCF Getting Started.html
+++ b/docs/TCF Getting Started.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework: Getting Started</h1>
-
+
<p>Copyright (c) 2007, 2008 Wind River Systems, Inc. Made available under the EPL v1.0
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
@@ -24,7 +24,7 @@
<h2><a name='Workspace'>Creating Eclipse Workspace</a></h2>
-<p>Eclipse can be used for developing clients for TCF in Java.
+<p>Eclipse can be used for developing clients for TCF in Java.
TCF host side code is organized into several Eclipse plug-in projects,
below are steps to create and populate Eclipse workspace with TCF projects:</p>
@@ -98,7 +98,7 @@ below are steps to create and populate Eclipse workspace with TCF projects:</p>
<dt><b>org.eclipse.tm.tcf</b>
<dd>This is the main TCF plugin. It contains Eclipse integration code for the framework.
It is the only TCF plugin, which (together with its fragments) should be required by a TCF client. The rest of TCF plugins are
- clients developed as a reference implementation or for demonstration purposes.
+ clients developed as a reference implementation or for demonstration purposes.
<p>
<dt><b>org.eclipse.tm.tcf.core</b>
<dd>This is a fragment of <b>org.eclipse.tm.tcf</b> plugin. It contains the framework itself and interfaces for standard services.
@@ -160,7 +160,7 @@ following changes in settings may be necessary:<ul>
add <tt>_CRT_SECURE_NO_DEPRECATE</tt></li>
<li>Project &gt; Properties &gt; Linker &gt; Input &gt; Additional Dependencies :
add <tt>shell32.lib</tt></li>
-</ul></li>
+</ul></li>
</ul></p>
<p>On <b>VxWorks</b>, line number mapping and the SysMonitor service (needed for RSE Processes
@@ -322,7 +322,7 @@ The integration has only been tested on Linux at this point.
<p><code>cd &lt;<i>luadir</i>&gt;
<br>curl -O http://www.lua.org/ftp/lua-5.1.4.tar.gz
-<br>tar zxf lua-5.1.4.tar.gz
+<br>tar zxf lua-5.1.4.tar.gz
<br>cd lua-5.1.4
<br>make linux
<br>make local
diff --git a/docs/TCF Project.html b/docs/TCF Project.html
index 3feb27f88..373ad50e6 100644
--- a/docs/TCF Project.html
+++ b/docs/TCF Project.html
@@ -12,9 +12,9 @@
<H2><A name='Index'></A>Index</H2>
<UL>
- <LI><A href="#Summary">Summary</A>
- <LI><A href="#Goals">Goals</A>
- <LI><A href="#Features">Features</A>
+ <LI><A href="#Summary">Summary</A>
+ <LI><A href="#Goals">Goals</A>
+ <LI><A href="#Features">Features</A>
<LI><A href="#Agent">Reference implementation of a target agent</A>
<LI><A href="#Debugger">Prototype of a debugger based on Eclipse Debug Framework and TCF</A>
<LI><A href="#RSE">Prototype of a system monitor and remote file access based on Remote System Explorer and TCF</A>
@@ -23,46 +23,46 @@
<P>
<H2><A name='Summary'></A>Summary </H2>
-<P>Today almost every device software development tool on the market has its own
-method of communication with target system. Communication methods often conflict
-with each other, require individual setup, configuration and maintenance, impose
-all kinds of unnecessary limitations. Target Communication Framework is designed
-to establish common ground in the area of communication protocols between
-development tools and embedded devices.
+<P>Today almost every device software development tool on the market has its own
+method of communication with target system. Communication methods often conflict
+with each other, require individual setup, configuration and maintenance, impose
+all kinds of unnecessary limitations. Target Communication Framework is designed
+to establish common ground in the area of communication protocols between
+development tools and embedded devices.
<P>
<H2><A name='Goals'></A>Goals </H2>
<P>
<UL>
- <LI>Universal, extensible, simple, lightweight, vendor agnostic framework for
- tools and targets to communicate for purpose of debugging, profiling, code
- patching and other device software development needs.
- <LI>Single configuration per target (not per tool per target as today in most
- cases), or no configuration when possible.
+ <LI>Universal, extensible, simple, lightweight, vendor agnostic framework for
+ tools and targets to communicate for purpose of debugging, profiling, code
+ patching and other device software development needs.
+ <LI>Single configuration per target (not per tool per target as today in most
+ cases), or no configuration when possible.
<LI>Small overhead and footprint on target side. </LI></UL>
<P>
<H2><A name='Features'></A>Features </H2>
-<P><A href="TCF Specification.html">Target Communication Framework Specification</A> is a document
-describing design goals, requirements and format of TCF communication protocol,
-as well as framework API and software design considerations.
-<P>TCF communication model is based on the idea of services. A service is a group
-of related commands, events and semantics. A service can be discovered,
-added or removed as a group at communication endpoint. Service definitions are
-not part of the framework specification, and new services are expected to be
-defined by developers of tools and target agents. However, standardization of
-common services is needed to achieve certain level of compatibility of
+<P><A href="TCF Specification.html">Target Communication Framework Specification</A> is a document
+describing design goals, requirements and format of TCF communication protocol,
+as well as framework API and software design considerations.
+<P>TCF communication model is based on the idea of services. A service is a group
+of related commands, events and semantics. A service can be discovered,
+added or removed as a group at communication endpoint. Service definitions are
+not part of the framework specification, and new services are expected to be
+defined by developers of tools and target agents. However, standardization of
+common services is needed to achieve certain level of compatibility of
tools/targets, see <A href="TCF Services.html">TCF Services Specification</A>
-as starting point of this work.
+as starting point of this work.
<H2><A name='Agent'></A>Reference implementation of a target agent</H2>
-<P>Current reference implementation of TCF target agents is fully functional,
-can run on Windows, Linux and VxWorks. On Linux it is implemented
-using PTRACE, on VxWorks is uses vxdbgLib, on Windows it uses Debug API and dbghelp.dll.
-The agent provides the following services:
+<P>Current reference implementation of TCF target agents is fully functional,
+can run on Windows, Linux and VxWorks. On Linux it is implemented
+using PTRACE, on VxWorks is uses vxdbgLib, on Windows it uses Debug API and dbghelp.dll.
+The agent provides the following services:
<UL>
- <LI>Run Control - provides threads and processes run control functionality
+ <LI>Run Control - provides threads and processes run control functionality
sufficient for debugging of user space programs.
<LI>Breakpoints - provides basic breakpoints support.
@@ -72,7 +72,7 @@ The agent provides the following services:
<LI>Memory - program memory access.
- <LI>Processes - provides access to the target OS's process
+ <LI>Processes - provides access to the target OS's process
information, allows starting new and terminating existing processes,
and allows attaching and detaching processes for debugging.
@@ -80,56 +80,56 @@ The agent provides the following services:
and corresponding machine instruction addresses in the executable object.
Implemented for Linux and Windows, not supported on VxWorks.
- <LI>Sys Monitor - provides list of processes, process attributes and
- CPU/memory utilization data. On Linux it is implemented using /proc file
- system, on Windows and VxWorks it is not currently supported.
+ <LI>Sys Monitor - provides list of processes, process attributes and
+ CPU/memory utilization data. On Linux it is implemented using /proc file
+ system, on Windows and VxWorks it is not currently supported.
<LI>File System - provides access to remote file system.
-
+
<LI>Streams - a generic service to support streaming of data between host and target.
- <LI>Diagnostics - allows testing of communication channel and agent
+ <LI>Diagnostics - allows testing of communication channel and agent
functionality.
</UL>
-<P>The agent code is designed to be easily extensible by adding new command
-handler implementations. The code separates machine dependences, common TCF
-logic and service implementations, which allows easy porting to a new OS or a
-target and reconfiguring of the agent for specific needs. The code is written in
+<P>The agent code is designed to be easily extensible by adding new command
+handler implementations. The code separates machine dependences, common TCF
+logic and service implementations, which allows easy porting to a new OS or a
+target and reconfiguring of the agent for specific needs. The code is written in
ANSI C. See <A href="TCF Linux Agent Prototype.html">TCF Linux Agent Prototype</A>
-for more details about the agent code.
+for more details about the agent code.
<H2><A name='Debugger'></A>Prototype of a debugger based on Eclipse Debug Framework and TCF</H2>
-<P>The prototype code connects Eclipse Debug Framework and Target Communication
-Framework. It allows to launch Eclipse debug session by connecting to a target
-running TCF agent, and then perform basic debugging tasks, like resuming,
+<P>The prototype code connects Eclipse Debug Framework and Target Communication
+Framework. It allows to launch Eclipse debug session by connecting to a target
+running TCF agent, and then perform basic debugging tasks, like resuming,
suspending, single-stepping, setting/removing breakpoints, etc.
-<P>The prototype launch configuration autodetects TCF targets on a local network
-and allows a user to connect to a target by simply selecting it from a list
-without a need for any further configuration or setup. TCF launch configuration
-dialog also offers controls to run a built-in diagnostics on a selecting target,
-which perform stress testing of communication channel, agent and target itself:
-<P><IMG alt="TCF launch configuration dialog" src="TCF_Launch_Dialog.jpg">
-
-<P>The prototype makes use of flexible debug model element hierarchy support,
-which is available in Eclipse debug framework since Eclipse 3.2. The flexible
-hierarchy allows debugger views to be "data driven" or, in other words, dynamically
-adapt to a given targets capabilities and structure, without a need to modify
+<P>The prototype launch configuration autodetects TCF targets on a local network
+and allows a user to connect to a target by simply selecting it from a list
+without a need for any further configuration or setup. TCF launch configuration
+dialog also offers controls to run a built-in diagnostics on a selecting target,
+which perform stress testing of communication channel, agent and target itself:
+<P><IMG alt="TCF launch configuration dialog" src="TCF_Launch_Dialog.jpg">
+
+<P>The prototype makes use of flexible debug model element hierarchy support,
+which is available in Eclipse debug framework since Eclipse 3.2. The flexible
+hierarchy allows debugger views to be "data driven" or, in other words, dynamically
+adapt to a given targets capabilities and structure, without a need to modify
debugger code to support a new target.
-
+
<H2><A name='RSE'></A>Prototype of a system monitor and remote file access based on Remote System Explorer and TCF</H2>
-<P>Remote System Explorer is an Eclipse based component that allows users to
-create connections to remote machines and explore their file systems, see list
-of processes and access some other resources, like remote shells. Remote System
-Explorer has been designed as a flexible, extensible framework to which Eclipse
-plug-in developers can contribute their own system definitions, actions, etc.
-<P>The prototype enables use of Processes and Files subsystems of Remote System
-Explorer over TCF. It also extends Processes subsystem to include CPU
+<P>Remote System Explorer is an Eclipse based component that allows users to
+create connections to remote machines and explore their file systems, see list
+of processes and access some other resources, like remote shells. Remote System
+Explorer has been designed as a flexible, extensible framework to which Eclipse
+plug-in developers can contribute their own system definitions, actions, etc.
+<P>The prototype enables use of Processes and Files subsystems of Remote System
+Explorer over TCF. It also extends Processes subsystem to include CPU
utilization data and some other process attributes in RSE views:
-<P><IMG alt="Remote System Explorer: Files subsystem over TCF" src="TCF_RSE_Files.jpg">
-<P><IMG alt="Remote System Explorer: Processes subsystem over TCF" src="TCF_RSE_Processes.jpg">
+<P><IMG alt="Remote System Explorer: Files subsystem over TCF" src="TCF_RSE_Files.jpg">
+<P><IMG alt="Remote System Explorer: Processes subsystem over TCF" src="TCF_RSE_Processes.jpg">
</BODY>
</HTML> \ No newline at end of file
diff --git a/docs/TCF Service - Breakpoints.html b/docs/TCF Service - Breakpoints.html
index d58617ff7..0bf6ce047 100644
--- a/docs/TCF Service - Breakpoints.html
+++ b/docs/TCF Service - Breakpoints.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Breakpoints</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -55,16 +55,16 @@
<p>A breakpoint is represented by a unique identifier and set of properties.
A breakpoint identifier (String id) needs to be unique across all hosts and targets.</p>
-
+
<p>A breakpoint's property set is an extensible collection of named attributes,
-which define the breakpoint's location, the conditions that trigger the breakpoint, and the actions
+which define the breakpoint's location, the conditions that trigger the breakpoint, and the actions
executed as a result. As such, breakpoint properties are separated into three broad categories:
<ul><b>
<li>Location properties
<li>Condition properties
<li>Action properties
</b></ul>
-<p>The Location and Condition properties dictate how a breakpoint is installed and whether it should be triggered.
+<p>The Location and Condition properties dictate how a breakpoint is installed and whether it should be triggered.
The Action properties dictate the effect of the breakpoint if it is triggered.
<p>The split of Location and Condition properties is subjective and is
@@ -83,19 +83,19 @@ change in any of the attached contexts. Adding properties reduces the
(sub)set of state changes that triggers the breakpoint.
<p>The <b>Location properties category</b> contains the following properties:
-<p>Context defining properties specifying which context a breakpoint applies to are provided through the <a href='#propContextIds'>ContextIds</a>,
-<a href='#propContextNames'>ContextNames </a> or the <a href='#propExecPaths'>ExecutablePaths</a> properties.
+<p>Context defining properties specifying which context a breakpoint applies to are provided through the <a href='#propContextIds'>ContextIds</a>,
+<a href='#propContextNames'>ContextNames </a> or the <a href='#propExecPaths'>ExecutablePaths</a> properties.
<p>The presence of certain properties defines what kind of breakpoint is installed.
<ul>
-<li>Line Breakpoints, which are configured using the <a href='#propFile'>File</a>,
+<li>Line Breakpoints, which are configured using the <a href='#propFile'>File</a>,
<a href='#propLine'>Line</a> and <a href='#propColumn'>Column</a> properties
-<li>Address breakpoints and watchpoints are configured using the <a href='#propLocation'>Location</a>,
-<a href='#propAccessMode'>AccessMode</a>, <a href='#propSize'>Size</a>,
+<li>Address breakpoints and watchpoints are configured using the <a href='#propLocation'>Location</a>,
+<a href='#propAccessMode'>AccessMode</a>, <a href='#propSize'>Size</a>,
<a href='#propMaskValue'>MaskValue </a>and <a href='#propMask'>Mask</a> properties.
-<li>Temporal breakpoints which are located on a time scale are configured using the <a href='#propTime'>Time</a>,
+<li>Temporal breakpoints which are located on a time scale are configured using the <a href='#propTime'>Time</a>,
<a href='#propTimeScale'>TimeScale</a>, and <a href='#propTimeUnits'> TimeUnits</a> properties.
</ul>
@@ -112,14 +112,14 @@ like actual addresses where breakpoint is installed or installation errors.
<p>Every breakpoint is associated with a communication channel and when the channel is closed
the target agent removes all corresponding breakpoints.
-Target agent should maintain separate breakpoint tables for each communication channel.
+Target agent should maintain separate breakpoint tables for each communication channel.
It is allowed to set the same breakpoint (same ID) through multiple
channels, target agent should treat it as single breakpoint with multiple references. Such a breakpoint
is removed when all referring channels are closed.
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdSet'>Set</a></h3>
@@ -141,8 +141,8 @@ C &bull; <i>&lt;token&gt;</i> &bull; Breakpoints &bull; set &bull; <i>&lt;array
</font></b></pre>
<p> The command downloads breakpoint data to a target agent.
-The command is intended to be used only to initialize the target's breakpoint table
-when communication channel is open. After that, host should
+The command is intended to be used only to initialize the target's breakpoint table
+when communication channel is open. After that, host should
notify the target about (incremental) changes in breakpoints data by sending
Add, Change and Remove commands.<p>
@@ -157,7 +157,7 @@ A breakpoint service implementation may not change the properties set by the cli
<dd>Breakpoint ID. This is the only required property.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propeEnabled'>"Enabled"</a> : <i>&lt;boolean&gt;</i></font></b></code>
- <dd>If true, the breakpoint is enabled.
+ <dd>If true, the breakpoint is enabled.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propType'>"Type"</a> : <i>&lt;string&gt;</i></font></b></code>
<dd>The breakpoint type
@@ -177,10 +177,10 @@ A breakpoint service implementation may not change the properties set by the cli
<dd>This property contains an array of contexts names (such as a process/thread name) for which this breakpoint should be installed.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propExecPaths'>"ExecutablePaths"</a> : <i>&lt;string&gt;</i></font></b></code>
- <dd>This property contains all the target executable paths for which this breakpoint should be installed.
+ <dd>This property contains all the target executable paths for which this breakpoint should be installed.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propLocation'> "Location" </a> : <i>&lt;string&gt;</i></font></b></code>
- <dd>If preset, defines location of the breakpoint. The expression evaluates either to a memory address
+ <dd>If preset, defines location of the breakpoint. The expression evaluates either to a memory address
or a register location.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propAccessMode'>"AccessMode"</a> : <i>&lt;int&gt;</i></font></b></code>
@@ -195,7 +195,7 @@ A breakpoint service implementation may not change the properties set by the cli
</dl>
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propSize'>"Size"</a> : <i>&lt;int&gt;</i></font></b></code>
<dd>The number of bytes starting at the location expression to which the AccessMode triggers applies
-
+
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propFile'>"File"</a> : <i>&lt;string&gt;</i></font></b></code>
<dd>Source code file name of breakpoint location.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propLine'>"Line"</a> : <i>&lt;int&gt;</i></font></b></code>
@@ -204,7 +204,7 @@ A breakpoint service implementation may not change the properties set by the cli
<dd>Source code column number of breakpoint location.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propMaskValue'>"MaskValue"</a> : <i>&lt;int&gt;</i></font></b></code>
- <dd>A breakpoint can be qualified with a mask value which may be further refined with a mask.
+ <dd>A breakpoint can be qualified with a mask value which may be further refined with a mask.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propMask'>"Mask"</a> : <i>&lt;int&gt;</i></font></b></code>
<dd>A mask which is bitwise ANDed with the value accessed.
@@ -234,7 +234,7 @@ A breakpoint service implementation may not change the properties set by the cli
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propIgnoreCount'>"IgnoreCount"</a>: <i>&lt;int&gt;</i></font></b></code>
<dd>The number of times this breakpoint is to be ignored before it is triggered. The ignore count is tested after all other Location and Condition properties are validated.
-
+
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name = 'propStopGroup'>"StopGroup"</a> : <i>&lt;string&gt;</i></font></b></code>
<dd>An array of TCF Context identifiers representing contexts to be stopped when this breakpoint is triggered.
This is an "Action" property that is used to stop contexts in addition to the one that triggered the breakpoint.
@@ -427,8 +427,8 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;b
</font></b></pre>
<p>Breakpoint status consists of a list of status properties. All properties are optional.
-Tools and targets can define additional properties.
-Setting any properties that are not supported by or unknown to the service implementation will yield an error,
+Tools and targets can define additional properties.
+Setting any properties that are not supported by or unknown to the service implementation will yield an error,
which is reported in the Error property of the breakpoint status object.</p>
<p>Predefined properties are:</p>
@@ -455,7 +455,7 @@ in a list of instance status data objects
<i>&lt;Instance status data list&gt;</i>
&rArr; <i>&lt;Instance status data&gt;</i>
&rArr; <i>&lt;Instance staus data list&gt;</i>, <i>&lt;Instance status data&gt;</i>
-
+
<i>&lt;Instance status data&gt;</i>
&rArr; <i>&lt;object&gt;</i>
</font></b></pre>
@@ -534,16 +534,16 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
</dl>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* Breakpoint is represented by unique identifier and set of properties.
* Breakpoint identifier (String id) needs to be unique across all hosts and targets.
- *
+ *
* Breakpoint properties (Map&lt;String,Object>) is extensible collection of named attributes,
* which define breakpoint location and behavior. This module defines some common
* attribute names (see PROP_*), host tools and target agents may support additional attributes.
- *
+ *
* For each breakpoint a target agent maintains another extensible collection of named attributes:
* breakpoint status (Map&lt;String,Object>, see STATUS_*). While breakpoint properties are
* persistent and represent user input, breakpoint status reflects dynamic target agent reports
@@ -583,31 +583,31 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
PROP_TEMPORARY = "Temporary"; // Boolean
<font color=#3F5FBF>/**
- * BreakpointType values
+ * BreakpointType values
*/</font>
<font color=#7F0055>static final</font> String
TYPE_RELATIVE = "Software",
TYPE_ABSOLUTE = "Hardware",
TYPE_AUTO = "Auto";
- <font color=#3F5FBF>/**
- * AccessMode values
+ <font color=#3F5FBF>/**
+ * AccessMode values
*/ </font>
- <font color=#7F0055>static final</font> int
+ <font color=#7F0055>static final</font> int
ACCESSMODE_READ = 0x01,
- ACCESSMODE_WRITE = 0x02,
+ ACCESSMODE_WRITE = 0x02,
ACCESSMODE_EXECUTE = 0x04,
ACCESSMODE_CHANGE = 0x08;
<font color=#3F5FBF>/**
- * TimeScale values
+ * TimeScale values
*/</font>
- <font color=#7F0055>static final</font> String
+ <font color=#7F0055>static final</font> String
TIMESCALE_RELATIVE = "Relative",
TIMESCALE_ABSOLUTE = "Absolute";
-
+
<font color=#3F5FBF>/**
- * TimeUnits values
+ * TimeUnits values
*/</font>
<font color=#7F0055>static final</font> String
TIMEUNIT_NSECS = "Nanoseconds",
@@ -623,7 +623,7 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
STATUS_FILE = "File", // String
STATUS_LINE = "Line", // Number
STATUS_COLUMN = "Column"; // Number
-
+
<font color=#3F5FBF>/**
* Breakpoint service capabilities.
*/</font>
@@ -643,11 +643,11 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
<font color=#3F5FBF>/**
* Download breakpoints data to target agent.
- * The command is intended to be used only to initialize target breakpoints table
- * when communication channel is open. After that, host should
+ * The command is intended to be used only to initialize target breakpoints table
+ * when communication channel is open. After that, host should
* notify target about (incremental) changes in breakpoint data by sending
* add, change and remove commands.
- *
+ *
* @param properties - array of breakpoints.
* @param done - command result call back object.
*/</font>
@@ -687,7 +687,7 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
* @param done - command result call back object.
*/</font>
IToken remove(String[] ids, DoneCommand done);
-
+
<font color=#3F5FBF>/**
* Upload IDs of breakpoints known to target agent.
* @param done - command result call back object.
diff --git a/docs/TCF Service - File System.html b/docs/TCF Service - File System.html
index 51666f56e..cd467db8e 100644
--- a/docs/TCF Service - File System.html
+++ b/docs/TCF Service - File System.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - File System</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -63,7 +63,7 @@
<p>File System service provides file transfer (and more generally file
system access) functionality in TCF. The service design is
derived from SSH File Transfer Protocol specifications.</p>
-
+
<h2><a name='ReqSync'>Request Synchronization and Reordering</a></h2>
<p>The protocol and implementations MUST process requests relating to
@@ -142,7 +142,7 @@ using a slash ('/') as the separator, and that will work as expected.</p>
<dd>Forces an existing file with the same name to be truncated to zero
length when creating a file by specifying TCF_O_CREAT.
TCF_O_CREAT MUST also be specified if this flag is used.
-
+
<dt><code>TCF_O_EXCL = 0x00000020</code>
<dd>Causes the request to fail if the named file already exists.
TCF_O_CREAT MUST also be specified if this flag is used.
@@ -403,7 +403,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;array of directory entries&gt;</i> &
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;directory entry list&gt;</i> ]
-
+
<i>&lt;directory entry list&gt;</i>
&rArr; <i>&lt;directory entry&gt;</i>
&rArr; <i>&ltdirectory entry list&gt;</i> , <i>&lt;directory entry&gt;</i>
@@ -468,7 +468,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; FileSystem &bull; roots &bull;
UNIX file system can report just one root with path "/". Other types of systems
can have more the one root. For example, Windows server can return multiple roots:
one per disc (e.g. "/C:/", "/D:/", etc.). Note: even Windows implementation of
-the service must use forward slash as directory separator, and must start
+the service must use forward slash as directory separator, and must start
absolute path with "/". Server should implement proper translation of
protocol file names to OS native names and back.</p>
@@ -583,7 +583,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
C &bull; <i>&lt;token&gt;</i> &bull; FileSystem &bull; user &bull;
</font></b></pre>
-<p>The command retrieves information about user account, which is used by server
+<p>The command retrieves information about user account, which is used by server
to access file system on behalf of the client.</p>
<p>Reply:</p>
@@ -594,7 +594,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* File System service provides file transfer (and more generally file
@@ -602,7 +602,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* derived from SSH File Transfer Protocol specifications.
*/</font>
<font color=#7F0055>public interface</font> IFileSystem <font color=#7F0055>extends</font> IService {
-
+
<font color=#3F5FBF>/**
* Service name.
*/</font>
@@ -612,7 +612,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* Flags to be used with open() method.
*/</font>
<font color=#7F0055>static final int</font>
-
+
<font color=#3F5FBF>/**
* Open the file for reading.
*/</font>
@@ -627,7 +627,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Force all writes to append data at the end of the file.
*/</font>
- TCF_O_APPEND = 0x00000004,
+ TCF_O_APPEND = 0x00000004,
<font color=#3F5FBF>/**
* If this flag is specified, then a new file will be created if one
@@ -672,30 +672,30 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* server normally returns all attributes it knows about.
*/</font>
<font color=#7F0055>final static class</font> FileAttrs {
-
+
<font color=#3F5FBF>/**
* The `flags' specify which of the fields are present.
*/</font>
<font color=#7F0055>public final int</font> flags;
-
+
<font color=#3F5FBF>/**
* The `size' field specifies the size of the file in bytes.
*/</font>
<font color=#7F0055>public final long</font> size;
-
+
<font color=#3F5FBF>/**
* The `uid' and `gid' fields contain numeric Unix-like user and group
* identifiers, respectively.
*/</font>
<font color=#7F0055>public final int</font> uid;
<font color=#7F0055>public final int</font> gid;
-
+
<font color=#3F5FBF>/**
* The `permissions' field contains a bit mask of file permissions as
* defined by posix [1].
*/</font>
<font color=#7F0055>public final int</font> permissions;
-
+
<font color=#3F5FBF>/**
* The `atime' and `mtime' contain the access and modification times of
* the files, respectively. They are represented as milliseconds from
@@ -708,13 +708,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* Additional (non-standard) attributes.
*/</font>
<font color=#7F0055>public final</font> Map&lt;String,Object&gt; attributes;
-
+
<font color=#7F0055>public</font> FileAttrs(<font color=#7F0055>int</font> flags, <font color=#7F0055>long</font> size, <font color=#7F0055>int</font> uid, <font color=#7F0055>int</font> gid,
<font color=#7F0055>int</font> permissions, <font color=#7F0055>long</font> atime, <font color=#7F0055>long</font> mtime, Map&lt;String,Object&gt; attributes);
-
+
<font color=#3F5FBF>/**
* Determines if the file system object is a file on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system can be considered to have "contents" that
* have the potential to be read and written as a byte stream.
*/</font>
@@ -722,13 +722,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Determines if the file system object is a directory on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system is a directory.
* That is, it contains entries that can be interpreted as other files.
*/</font>
<font color=#7F0055>public boolean</font> isDirectory();
}
-
+
<font color=#3F5FBF>/**
* The following flags are defined for the 'permissions' field:
*/</font>
@@ -756,14 +756,14 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
S_IROTH = 00004, // others have read permission
S_IWOTH = 00002, // others have write permisson
S_IXOTH = 00001; // others have execute permission
-
+
<font color=#7F0055>final static class</font> DirEntry {
<font color=#3F5FBF>/**
* `filename' is a file name being returned. It is a relative name within
* the directory, without any path components;
*/</font>
<font color=#7F0055>public final</font> String filename;
-
+
<font color=#3F5FBF>/**
* `longname' is an expanded format for the file name, similar to what
* is returned by "ls -l" on Unix systems.
@@ -775,29 +775,29 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* use the attrs field instead.
*/</font>
<font color=#7F0055>public final</font> String longname;
-
+
<font color=#3F5FBF>/**
* `attrs' is the attributes of the file.
*/</font>
<font color=#7F0055>public final</font> FileAttrs attrs;
-
+
<font color=#7F0055>public</font> DirEntry(String filename, String longname, FileAttrs attrs);
}
-
+
<font color=#3F5FBF>/**
* Opaque representation of open file handle.
- * Note: open file handle can be used only with service instance that
+ * Note: open file handle can be used only with service instance that
* created the handle.
*/</font>
<font color=#7F0055>interface</font> IFileHandle {
IFileSystem getService();
}
-
+
<font color=#3F5FBF>/**
* Service specific error codes.
*/</font>
<font color=#7F0055>static final int</font>
-
+
<font color=#3F5FBF>/**
* Indicates end-of-file condition; for read() it means that no
* more data is available in the file, and for readdir() it
@@ -817,19 +817,19 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
*/</font>
STATUS_PERMISSION_DENIED = 0x10003;
-
+
<font color=#3F5FBF>/**
- * The class to represent File System error reports.
+ * The class to represent File System error reports.
*/</font>
<font color=#7F0055>abstract static class</font> FileSystemException extends IOException {
-
+
<font color=#7F0055>protected</font> FileSystemException(String message);
-
+
<font color=#7F0055>protected</font> FileSystemException(Exception x)
-
+
<font color=#3F5FBF>/**
* Get error code. The code can be standard TCF error code or
- * one of service specific codes, see STATUS_*.
+ * one of service specific codes, see STATUS_*.
* @return error code.
*/</font>
<font color=#7F0055>public abstract int</font> getStatus();
@@ -837,7 +837,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Open or create a file on a remote system.
- *
+ *
* @param file_name specifies the file name. See 'File Names' for more information.
* @param flags is a bit mask of TCF_O_* flags.
* @param attrs specifies the initial attributes for the file.
@@ -846,25 +846,25 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken open(String file_name, <font color=#7F0055>int</font> flags, FileAttrs attrs, DoneOpen done);
-
+
<font color=#7F0055>interface</font> DoneOpen {
<font color=#7F0055>void</font> doneOpen(IToken token, FileSystemException error, IFileHandle handle);
}
-
+
<font color=#3F5FBF>/**
* Close a file on a remote system.
- *
+ *
* @param handle is a handle previously returned in the response to
* open() or opendir().
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken close(IFileHandle handle, DoneClose done);
-
+
<font color=#7F0055>interface</font> DoneClose {
<font color=#7F0055>void</font> doneClose(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
* Read bytes from an open file.
* In response to this request, the server will read as many bytes as it
@@ -875,7 +875,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* true in case of EOF. For normal disk files, it is guaranteed
* that this will read the specified number of bytes, or up to end of file
* or error. For e.g. device files this may return fewer bytes than requested.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start reading.
@@ -884,7 +884,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken read(IFileHandle handle, long offset, <font color=#7F0055>int</font> len, DoneRead done);
-
+
<font color=#7F0055>interface</font> DoneRead {
<font color=#7F0055>void</font> doneRead(IToken token, FileSystemException error, byte[] data, boolean eof);
}
@@ -895,7 +895,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* It is legal to write way beyond the end of the file; the semantics
* are to write zeroes from the end of the file to the specified offset
* and then the data.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start writing.
@@ -911,10 +911,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#7F0055>interface</font> DoneWrite {
<font color=#7F0055>void</font> doneWrite(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
* Retrieve file attributes.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
@@ -925,27 +925,27 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Retrieve file attributes.
* Unlike 'stat()', 'lstat()' does not follow symbolic links.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken lstat(String path, DoneStat done);
-
+
<font color=#3F5FBF>/**
* Retrieve file attributes for an open file (identified by the file handle).
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken fstat(IFileHandle handle, DoneStat done);
-
+
<font color=#7F0055>interface</font> DoneStat {
<font color=#7F0055>void</font> doneStat(IToken token, FileSystemException error, FileAttrs attrs);
}
-
+
<font color=#3F5FBF>/**
* Set file attributes.
* This request is used for operations such as changing the ownership,
@@ -953,7 +953,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* An error will be returned if the specified file system object does
* not exist or the user does not have sufficient rights to modify the
* specified attributes.
- *
+ *
* @param path specifies the file system object (e.g. file or directory)
* whose attributes are to be modified.
* @param attrs specifies the modifications to be made to file attributes.
@@ -961,23 +961,23 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken setstat(String path, FileAttrs attrs, DoneSetStat done);
-
+
<font color=#3F5FBF>/**
* Set file attributes for an open file (identified by the file handle).
* This request is used for operations such as changing the ownership,
* permissions or access times, as well as for truncating a file.
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param attrs specifies the modifications to be made to file attributes.
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken fsetstat(IFileHandle handle, FileAttrs attrs, DoneSetStat done);
-
+
<font color=#7F0055>interface</font> DoneSetStat {
<font color=#7F0055>void</font> doneSetStat(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
* The opendir() command opens a directory for reading.
* Once the directory has been successfully opened, files (and
@@ -991,7 +991,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken opendir(String path, DoneOpen done);
-
+
<font color=#3F5FBF>/**
* The files in a directory can be listed using the opendir() and
* readdir() requests. Each readdir() request returns one
@@ -1007,21 +1007,21 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken readdir(IFileHandle handle, DoneReadDir done);
-
+
<font color=#7F0055>interface</font> DoneReadDir {
<font color=#7F0055>void</font> doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof);
}
-
+
<font color=#3F5FBF>/**
* Create a directory on the server.
- *
+ *
* @param path - specifies the directory to be created.
* @param attrs - new directory attributes.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken mkdir(String path, FileAttrs attrs, DoneMkDir done);
-
+
<font color=#7F0055>interface</font> DoneMkDir {
<font color=#7F0055>void</font> doneMkDir(IToken token, FileSystemException error);
}
@@ -1032,13 +1032,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* with the specified path exists, or if the specified directory is not
* empty, or if the path specified a file system object other than a
* directory.
- *
+ *
* @param path - specifies the directory to be removed.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken rmdir(String path, DoneRemove done);
-
+
<font color=#7F0055>interface</font> DoneRemove {
<font color=#7F0055>void</font> doneRemove(IToken token, FileSystemException error);
}
@@ -1048,15 +1048,15 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* UNIX file system can report just one root with path "/". Other types of systems
* can have more the one root. For example, Windows server can return multiple roots:
* one per disc (e.g. "/C:/", "/D:/", etc.). Note: even Windows implementation of
- * the service must use forward slash as directory separator, and must start
+ * the service must use forward slash as directory separator, and must start
* absolute path with "/". Server should implement proper translation of
- * protocol file names to OS native names and back.
- *
+ * protocol file names to OS native names and back.
+ *
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken roots(DoneRoots done);
-
+
<font color=#7F0055>interface</font> DoneRoots {
<font color=#7F0055>void</font> doneRoots(IToken token, FileSystemException error, DirEntry[] entries);
}
@@ -1064,24 +1064,24 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Remove a file or symbolic link.
* This request cannot be used to remove directories.
- *
+ *
* @param file_name is the name of the file to be removed.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken remove(String file_name, DoneRemove done);
-
+
<font color=#3F5FBF>/**
* Canonicalize any given path name to an absolute path.
* This is useful for converting path names containing ".." components or
* relative pathnames without a leading slash into absolute paths.
- *
+ *
* @param path specifies the path name to be canonicalized.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken realpath(String path, DoneRealPath done);
-
+
<font color=#7F0055>interface</font> DoneRealPath {
<font color=#7F0055>void</font> doneRealPath(IToken token, FileSystemException error, String path);
}
@@ -1092,48 +1092,48 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* with the name specified by 'new_path'. The server may also fail rename
* requests in other situations, for example if `old_path' and `new_path'
* point to different file systems on the server.
- *
+ *
* @param old_path is the name of an existing file or directory.
* @param new_path is the new name for the file or directory.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken rename(String old_path, String new_path, DoneRename done);
-
+
<font color=#7F0055>interface</font> DoneRename {
<font color=#7F0055>void</font> doneRename(IToken token, FileSystemException error);
}
<font color=#3F5FBF>/**
* Read the target of a symbolic link.
- *
+ *
* @param path specifies the path name of the symbolic link to be read.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken readlink(String path, DoneReadLink done);
-
+
<font color=#7F0055>interface</font> DoneReadLink {
<font color=#7F0055>void</font> doneReadLink(IToken token, FileSystemException error, String path);
}
<font color=#3F5FBF>/**
* Create a symbolic link on the server.
- *
+ *
* @param link_path specifies the path name of the symbolic link to be created.
* @param target_path specifies the target of the symbolic link.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken symlink(String link_path, String target_path, DoneSymLink done);
-
+
<font color=#7F0055>interface</font> DoneSymLink {
<font color=#7F0055>void</font> doneSymLink(IToken token, FileSystemException error);
}
<font color=#3F5FBF>/**
* Copy a file on remote system.
- *
+ *
* @param src_path specifies the path name of the file to be copied.
* @param dst_path specifies destination file name.
* @param copy_permissions - if true then copy source file permissions.
@@ -1143,20 +1143,20 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
*/</font>
IToken copy(String src_path, String dst_path,
boolean copy_permissions, boolean copy_ownership, DoneCopy done);
-
+
<font color=#7F0055>interface</font> DoneCopy {
<font color=#7F0055>void</font> doneCopy(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
- * Retrieve information about user account, which is used by server
+ * Retrieve information about user account, which is used by server
* to access file system on behalf of the client.
- *
+ *
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken user(DoneUser done);
-
+
<font color=#7F0055>interface</font> DoneUser {
<font color=#7F0055>void</font> doneUser(IToken token, FileSystemException error,
<font color=#7F0055>int</font> real_uid, <font color=#7F0055>int</font> effective_uid, <font color=#7F0055>int</font> real_gid, <font color=#7F0055>int</font> effective_gid,
diff --git a/docs/TCF Service - Memory.html b/docs/TCF Service - Memory.html
index 559ddcbe2..2079567fd 100644
--- a/docs/TCF Service - Memory.html
+++ b/docs/TCF Service - Memory.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Memory</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -53,20 +53,20 @@ and event parameters are encoded as zero terminated <a href='TCF Specification.h
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<p>A single memory access can succeed for some addresses and fail for others. In such
situation result message can contain partially valid data. Array of error addresses,
in addition to error report, describes data validity on per byte basis:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;array of error addresses&gt;</i>
&rArr; null
&rArr; [ <i>&lt;error address list&gt;</i> ]
-
+
<i>&lt;error address list&gt;</i>
&rArr; <i>&lt;error address&gt;</i>
&rArr; <i>&lt;error address list&gt;</i> , <i>&lt;error address&gt;</i>
-
+
<i>&lt;error address&gt;</i>
&rArr; { "addr" : <i>&lt;int: range starting address&gt;</i> , "size" : <i>&lt;int: range length in bytes&gt;</i> , "stat" : <i>&lt;int: status code&gt;</i> , "msg" : <i>&lt;object: error description&gt;</i> }
</font></b></pre>
@@ -86,7 +86,7 @@ byte is defined by main error report.</p>
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Memory &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -95,20 +95,20 @@ C &bull; <i>&lt;token&gt;</i> &bull; Memory &bull; getContext &bull; <i>&lt;stri
execution thread, process, address space, etc. Exact
meaning of a context depends on the target. Target agent should define contexts hierarchy
that is:</p>
-
+
<ul type='disc'>
<li>Sufficient to resolve possible ambiguity of a memory address;
-
+
<li>Adequately reflects target memory management strategy;
-
+
<li>Intuitive to a user.
</ul>
-
+
<p>For traditional OS, like UNIX, memory access context can be one of:</p>
-
+
<ul type='disc'>
<li>Kernel address space;
-
+
<li>A process.
</ul>
@@ -197,20 +197,20 @@ Service sends contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Memory &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for memory access commands.</p>
-
+
<p>Parent context ID can be null &ndash; to retrieve top level of the hierarchy, can be one
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -218,7 +218,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -226,9 +226,9 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
</font></b></pre>
<h3><a name='CmdSetMemory'>Set Memory</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
-C &bull; &lt;token&gt; &bull; Memory &bull; set &bull;
+C &bull; &lt;token&gt; &bull; Memory &bull; set &bull;
<i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: address&gt;</i> &bull; <i>&lt;int: word size&gt;</i> &bull;
<i>&lt;int: byte count&gt;</i> &bull; <i>&lt;int: mode&gt;</i> &bull; <i>&lt;string: BASE64 encoded byte array&gt;</i> &bull;
</font></b></pre>
@@ -236,15 +236,15 @@ C &bull; &lt;token&gt; &bull; Memory &bull; set &bull;
<p>Writes data bytes at given address in memory, "word size" bytes at a time. Address
should be aligned by "word size". Context ID must be one returned by getContexts.
Mode is logical OR of any combination of:</p>
-
+
<ul type='disc'>
<li>0x1 &ndash; continue on error (like bus error or page fault)
-
+
<li>0x2 &ndash; verify data after writing by reading back and compare
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of error addresses&gt;</i> &bull;
</font></b></pre>
@@ -254,7 +254,7 @@ of error. Error addresses, when present, let client know which bytes of data fai
to be written into memory.</p>
<h3><a name='CmdGetMemory'>Get Memory</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Memory &bull; get &bull;
<i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: address&gt;</i> &bull; <i>&lt;int: word size&gt;</i> &bull;
@@ -264,15 +264,15 @@ C &bull; &lt;token&gt; &bull; Memory &bull; get &bull;
<p>Reads data bytes at given address in memory, "word size" bytes at a time. Address
should be aligned by "word size". Context ID must be one returned by getContexts.
Mode is logical OR of any combination of:</p>
-
+
<ul type='disc'>
<li>0x1 &ndash; continue on error (like bus error or page fault)
-
+
<li>0x2 &ndash; verify data after reading by re-reading and compare
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;string: BASE64 encoded byte array&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of error addresses&gt;</i> &bull;
</font></b></pre>
@@ -282,9 +282,9 @@ of error. Error addresses, when present, let client know which bytes of data fai
to be retrieved from memory.</p>
<h3><a name='CmdFillMemory'>Fill Memory</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
-C &bull; &lt;token&gt; &bull; Memory &bull; fill &bull;
+C &bull; &lt;token&gt; &bull; Memory &bull; fill &bull;
<i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: address&gt;</i> &bull; <i>&lt;int: word size&gt;</i> &bull;
&lt;int: byte count&gt; &bull; <i>&lt;int: mode&gt;</i> &bull; <i>&lt;array: array of pattern bytes&gt;</i> &bull;
</font></b></pre>
@@ -293,15 +293,15 @@ C &bull; &lt;token&gt; &bull; Memory &bull; fill &bull;
should be aligned by "word size". If "byte count" is bigger then pattern size, then
pattern is repeated necessary number of times. Context ID must be one returned by
getContexts. Mode is logical OR of any combination of:</p>
-
+
<ul type='disc'>
<li>0x1 &ndash; continue on error (like bus error or page fault)
-
+
<li>0x2 &ndash; verify data after writing by reading back and compare
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of error addresses&gt;</i> &bull;
</font></b></pre>
@@ -311,29 +311,29 @@ of error. Error addresses, when present, let client know which bytes of data fai
to be written into memory.</p>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Memory service broadcasts notification events when memory contexts are added, removed
or changed, and when memory content is altered by "set" or "fill" commands.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; Memory &bull; contextAdded &bull; <i>&lt;array of context data&gt;</i> &bull;
E &bull; Memory &bull; contextChanged &bull; <i>&lt;array of context data&gt;</i> &bull;
E &bull; Memory &bull; contextRemoved &bull; <i>&lt;array of context IDs&gt;</i> &bull;
E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;array of address ranges&gt;</i> &bull;
-
+
<i>&lt;array of context data&gt;</i> <font face="Times New Roman" size=3>- see Get Contexts command.</font>
-
+
<i>&lt;array of context IDs&gt;</i>
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
-
+
<i>&lt;array of address ranges&gt;</i>
&rArr; null
&rArr; [ <i>&lt;address ranges list&gt;</i> ]
-
+
<i>&lt;address ranges list&gt;</i>
&rArr; <i>&lt;address range&gt;</i>
&rArr; <i>&lt;address ranges list&gt;</i> , <i>&lt;address range&gt;</i>
@@ -343,13 +343,13 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* IMemory service provides basic operations to read/write memory on a target.
*/</font>
<font color=#7F0055>public interface</font> Memory <font color=#7F0055>extends</font> Service {
-
+
<font color=#7F0055>static final</font> String NAME = "Memory";
<font color=#3F5FBF>/**
@@ -365,7 +365,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
PROP_START_BOUND = "StartBound", <font color=#3F5FBF>/** Number, lowest address (inclusive) which is valid for the context */</font>
PROP_END_BOUND = "EndBound", <font color=#3F5FBF>/** Number, highest address (inclusive) which is valid for the context */</font>
PROP_ACCESS_TYPES = "AccessTypes"; <font color=#3F5FBF>/** Array of String, the access types allowed for this context */</font>
-
+
<font color=#3F5FBF>/**
* Values of "AccessTypes".
* Target system can support multiple different memory access types, like instruction and data access.
@@ -386,11 +386,11 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
ACCESS_PHYSICAL = "physical", <font color=#3F5FBF>/** Context uses physical addresses */</font>
ACCESS_CACHE = "cache", <font color=#3F5FBF>/** Context is a cache */</font>
ACCESS_TLB = "tlb"; <font color=#3F5FBF>/** Context is a TLB memory */</font>
-
+
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -416,7 +416,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getContexts commands.
@@ -443,89 +443,89 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
* were not processed correctly.
*/</font>
<font color=#7F0055>final static int</font> MODE_CONTINUEONERROR = 0x1;
-
+
<font color=#3F5FBF>/**
* Memory access mode:
* Verify result of memory operations (by reading and comparing).
*/</font>
<font color=#7F0055>final static int</font> MODE_VERIFY = 0x2;
-
+
<font color=#7F0055>interface</font> MemoryContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context ID.
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent ID.
*/</font>
String getParentID();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get process ID, if applicable.
* <font color=#7F9FBF>@return</font> process ID.
*/</font>
String getProcessID();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get memory endianess.
* <font color=#7F9FBF>@return</font> true if memory id big-endian.
*/</font>
boolean isBigEndian();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get memory address size.
* <font color=#7F9FBF>@return</font> number of bytes used to store memory address value.
*/</font>
<font color=#7F0055>int</font> getAddressSize();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get memory context name.
* The name can be used for UI purposes.
* <font color=#7F9FBF>@return</font> context name.
*/</font>
String getName();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get lowest address (inclusive) which is valid for the context.
* <font color=#7F9FBF>@return</font> lowest address.
*/</font>
Number getStartBound();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get highest address (inclusive) which is valid for the context.
* <font color=#7F9FBF>@return</font> highest address.
*/</font>
Number getEndBound();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get the access types allowed for this context.
* <font color=#7F9FBF>@return</font> collection of access type names.
*/</font>
Collection&lt;String> getAccessTypes();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context properties.
* <font color=#7F9FBF>@return</font> all available context properties.
*/</font>
Map&lt;String,Object> getProperties();
-
+
<font color=#3F5FBF>/**
* Set target memory.
* If 'word_size' is 0 it means client does not care about word size.
*/</font>
<font color=#7F0055>void</font> set(long addr, <font color=#7F0055>int</font> word_size, byte[] buf,
<font color=#7F0055>int</font> offs, <font color=#7F0055>int</font> size, <font color=#7F0055>int</font> mode, DoneMemory done);
-
+
<font color=#3F5FBF>/**
* Read target memory.
*/</font>
<font color=#7F0055>void</font> get(long addr, <font color=#7F0055>int</font> word_size, byte[] buf,
<font color=#7F0055>int</font> offs, <font color=#7F0055>int</font> size, <font color=#7F0055>int</font> mode, DoneMemory done);
-
+
<font color=#3F5FBF>/**
* Fill target memory with given pattern.
* 'size' is number of bytes to fill.
@@ -533,7 +533,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
<font color=#7F0055>void</font> fill(long addr, <font color=#7F0055>int</font> word_size, byte[] value,
<font color=#7F0055>int</font> size, <font color=#7F0055>int</font> mode, DoneMemory done);
}
-
+
<font color=#3F5FBF>/**
* Client callback interface for set(), get() and fill().
*/</font>
@@ -543,7 +543,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
<font color=#7F0055>class</font> MemoryError <font color=#7F0055>extends</font> Exception {
}
-
+
<font color=#3F5FBF>/**
* ErrorOffset interface can be implemented by MemoryError object,
* which is returned by get, set and fill commands.
@@ -556,26 +556,26 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
* possible reasons of partial memory operation.
*/</font>
<font color=#7F0055>interface</font> ErrorOffset {
-
+
// Error may have per byte information
- <font color=#7F0055>final static int</font>
+ <font color=#7F0055>final static int</font>
BYTE_VALID = 0x00,
BYTE_UNKNOWN = 0x01, // e.g. out of range
BYTE_INVALID = 0x02,
BYTE_CANNOT_READ = 0x04,
BYTE_CANNOT_WRITE = 0x08;
-
+
<font color=#7F0055>int</font> getStatus(<font color=#7F0055>int</font> offset);
-
+
<font color=#3F5FBF>/**
* Returns the detail message string about the
* byte associated with specified location.
* <font color=#7F9FBF>@return</font> the detail error message string.
*/</font>
String getMessage(<font color=#7F0055>int</font> offset);
-
+
}
-
+
<font color=#3F5FBF>/**
* Add memory service event listener.
* <font color=#7F9FBF>@param</font> listener - event listener implementation.
@@ -590,27 +590,27 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
<font color=#3F5FBF>/**
* Memory event listener is notified when memory context hierarchy
- * changes, and when memory is modified by memory service commands.
+ * changes, and when memory is modified by memory service commands.
*/</font>
<font color=#7F0055>interface</font> MemoryListener {
-
+
<font color=#3F5FBF>/**
* Called when a new memory access context(s) is created.
*/</font>
<font color=#7F0055>void</font> contextAdded(Context[] contexts);
-
+
<font color=#3F5FBF>/**
* Called when a new memory access context(s) properties changed.
*/</font>
<font color=#7F0055>void</font> contextChanged(Context[] contexts);
-
+
<font color=#3F5FBF>/**
* Called when memory access context(s) is removed.
*/</font>
<font color=#7F0055>void</font> contextRemoved(String[] context_ids);
-
+
<font color=#3F5FBF>/**
- * Called when target memory content was changed and clients
+ * Called when target memory content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached memory data.
* Not every change is notified - it is not possible,
diff --git a/docs/TCF Service - Processes.html b/docs/TCF Service - Processes.html
index 1c0bfa5db..ec4a3d20e 100644
--- a/docs/TCF Service - Processes.html
+++ b/docs/TCF Service - Processes.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Processes</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -45,18 +45,18 @@
<tr>
<td>0.2
<td>2009-02-26
- <td>Added signal and environment commands, and properties for standard I/O redirection
+ <td>Added signal and environment commands, and properties for standard I/O redirection
</table>
<h2><a name='Overview'>Overview</a></h2>
-<p>Processes service provides access to the target OS's process
+<p>Processes service provides access to the target OS's process
information, allows to start and terminate a process, and allows
to attach and detach a process for debugging. Debug services,
like Memory and Run Control, require a process to be attached
before they can access it.</p>
-<p>If a process is started by this service, its standard input/output streams are
+<p>If a process is started by this service, its standard input/output streams are
available for client to read/write using <a href='TCF Service - Streams.html'>Streams Service</a>. Stream type of such
streams is set to "Processes".</p>
@@ -65,11 +65,11 @@ as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -82,7 +82,7 @@ However, 'Processes.getContext' is supposed to return only process specific data
If the ID is not a process ID, 'Processes.getContext' may not return any
useful information.
</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -104,42 +104,42 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;c
<li><code><b><font face="Courier New" size=2 color=#333399>"ParentID" : <i>&lt;string&gt;</i></font></b></code>
- parent context ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Name" : <i>&lt;string&gt;</i></font></b></code>
- process name. Client UI can show this name to a user.
<li><code><b><font face="Courier New" size=2 color=#333399>"Attached" : <i>&lt;boolean&gt;</i></font></b></code>
- true if the context is attached to debugger.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CanTerminate" : <i>&lt;boolean&gt;</i></font></b></code>
- true if the service can terminate the process.
<li><code><b><font face="Courier New" size=2 color=#333399>"StdInID" : <i>&lt;string&gt;</i></font></b></code>
- process standard input stream ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StdOutID" : <i>&lt;string&gt;</i></font></b></code>
- process standard output stream ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StdErrID" : <i>&lt;string&gt;</i></font></b></code>
- process standard error stream ID.
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull; <i>&lt;boolean: attached only&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for process control commands.</p>
-
+
<p>Parent context ID can be null &ndash; to retrieve top level of the hierarchy, can be one
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
<p>If <i>&lt;boolean: attached only&gt;</i> is true, the command returns only those processes that are attached for debugging.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;
@@ -147,65 +147,65 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
</font></b></pre>
<h3><a name='CmdAttach'>Attach</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; attach &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command attaches debugger to a process.
Services like Run Control, Memory, Breakpoints work only with attached processes.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdDetach'>Detach</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; detach &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command detaches debugger from a process.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdTerminate'>Terminate</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; terminate &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command terminates a process.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdGetSignalList'>Get Signal List</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getSignalList &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command returns a complete list of available signals. The list containg all signals that can be sent to a given context.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of signal descriptions&gt;</i> &bull;
@@ -213,7 +213,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;signal description list&gt;</i> ]
-
+
<i>&lt;signal description list&gt;</i>
&rArr; <i>&lt;object: signal description&gt;</i>
&rArr; <i>&lt;signal description list&gt;</i> , <i>&lt;object: signal description&gt;</i>
@@ -233,7 +233,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<h3><a name='CmdGetSignalMask'>Get Signal Mask</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getSignalMask &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -244,7 +244,7 @@ When new context is created it inherits the mask from its parent.
If context is not attached the command will return an error.</p>
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;int: don't stop bitset&gt;</i> &bull; <i>&lt;int: don't pass bitset&gt;</i> &bull; <i>&lt;int: pending bitset&gt;</i> &bull;
</font></b></pre>
@@ -256,7 +256,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;i
Note: "pending bitset" is meaningful only if the context is suspended.
<h3><a name='CmdSetSignalMask'>Set Signal Mask</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; setSignalMask &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: don't stop bitset&gt;</i> &bull; <i>&lt;int: don't pass bitset&gt;</i> &bull;
</font></b></pre>
@@ -266,46 +266,46 @@ Bits in the mask control how signals should be handled by debug agent.
If context is not attached the command will return an error.</p>
<ul>
<li>don't stop bitset - signals that should not suspend execution of the context.
- By default, debugger suspends a process before it receives a signal.
+ By default, debugger suspends a process before it receives a signal.
<li>don't pass bitset - signals that should not be delivered to the context.
</ul>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdSignal'>Signal</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; signal &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: signal&gt;</i> &bull;
</font></b></pre>
<p>The command sends a signal to a context.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdGetEnvironment'>Get Environment</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getEnvironment &bull;
</font></b></pre>
<p>The command returns default set of environment variables used to start a new process.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;object: environment variables&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdStart'>Start</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; start &bull; <i>&lt;string: working directory&gt;</i> &bull; <i>&lt;string: program image file&gt;</i> &bull;
<i>&lt;string array: command line&gt;</i> &bull; <i>&lt;object: environment variables&gt;</i> &bull; <i>&lt;boolean: attach&gt;</i> &bull;
@@ -314,7 +314,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; start &bull; <i>&lt;string
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;string list&gt;</i> ]
-
+
<i>&lt;string list&gt;</i>
&rArr; <i>&lt;string&gt;</i>
&rArr; <i>&lt;string list&gt;</i> , <i>&lt;string&gt;</i>
@@ -326,12 +326,12 @@ C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; start &bull; <i>&lt;string
<li><i>&lt;string: program image file&gt;</i> - image file to start process with.
<li><i>&lt;string array: command line&gt;</i> - command line arguments for the process.
<li><i>&lt;object: environment variables&gt;</i> - list of environment variables for the process,
- they will be added to default process environment.
+ they will be added to default process environment.
<li><i>&lt;boolean: attach&gt;</i> - if true debugger should be attached to the process.</p>
</ul>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;context data&gt;</i> &bull;
</font></b></pre>
@@ -342,18 +342,18 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;c
<p>Processes service broadcasts notification event when a proceess exits.
Only processes that were started by the service will generate exit event.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull; <i>&lt;int: exit code&gt;</i> &bull;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> IProcesses <font color=#7F0055>extends</font> IService {
<font color=#7F0055>static final</font> String NAME = "Processes";
-
+
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
* A context corresponds to an execution thread, process, address space, etc.
@@ -363,8 +363,8 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* However, 'Processes.getContext' is supposed to return only process specific data,
* If the ID is not a process ID, 'IProcesses.getContext' may not return any
* useful information
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -383,10 +383,10 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#3F5FBF>/**
* Retrieve children of given context.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* <font color=#7F9FBF>@param</font> attached_only - if true return only attached process IDs.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
@@ -403,38 +403,38 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
* Context property names.
*/</font>
<font color=#7F0055>static final</font> String
<font color=#3F5FBF>/** The TCF context ID */</font>
PROP_ID = "ID",
-
+
<font color=#3F5FBF>/** The TCF parent context ID */</font>
PROP_PARENTID = "ParentID",
-
+
<font color=#3F5FBF>/** Is the context attached */</font>
PROP_ATTACHED = "Attached",
-
+
<font color=#3F5FBF>/** Can terminate the context */</font>
PROP_CAN_TERMINATE = "CanTerminate",
-
+
<font color=#3F5FBF>/** Process name. Client UI can show this name to a user */</font>
PROP_NAME = "Name",
<font color=#3F5FBF>/** Process standard input stream ID */</font>
PROP_STDIN_ID = "StdInID",
-
+
<font color=#3F5FBF>/** Process standard output stream ID */</font>
PROP_STDOUT_ID = "StdOutID",
-
+
<font color=#3F5FBF>/** Process standard error stream ID */</font>
PROP_STDERR_ID = "StdErrID";
-
+
<font color=#7F0055>interface</font> ProcessContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context ID.
* Same as getProperties().get(&ldquo;ID&rdquo;)
*/</font>
@@ -471,7 +471,7 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> Map 'property name' -> 'property value'
*/</font>
Map&lt;String, Object&gt; getProperties();
-
+
<font color=#3F5FBF>/**
* Attach debugger to a process.
* Services like IRunControl, IMemory, IBreakpoints work only with attached processes.
@@ -487,15 +487,15 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken detach(DoneCommand done);
-
+
<font color=#3F5FBF>/**
- * Terminate a process.
+ * Terminate a process.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken terminate(DoneCommand done);
}
-
+
<font color=#7F0055>interface</font> DoneCommand {
<font color=#7F0055>void</font> doneCommand(IToken token, Exception error);
}
@@ -506,16 +506,16 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#7F0055>static final</font> String
<font color=#3F5FBF>/** Number, bit position in the signal mask */</font>
SIG_INDEX = "Index",
-
+
<font color=#3F5FBF>/** String, signal name, for example "SIGHUP" */</font>
SIG_NAME = "Name",
-
+
<font color=#3F5FBF>/** Number, signal code, as defined by OS */</font>
SIG_CODE = "Code",
-
+
<font color=#3F5FBF>/** String, human readable description of the signal */</font>
SIG_DESCRIPTION = "Description";
-
+
<font color=#3F5FBF>/**
* Get list of signals that can be send to the context.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
@@ -529,17 +529,17 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#7F0055>interface</font> DoneGetSignalList {
<font color=#7F0055>void</font> doneGetSignalList(IToken token, Exception error, Collection<Map<String,Object>> list);
}
-
+
<font color=#3F5FBF>/**
* Get process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
* When new context is created it inherits the mask from its parent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken getSignalMask(String context_id, DoneGetSignalMask done);
-
+
<font color=#3F5FBF>/**
* Call-back interface to be called when "getSignalMask" command is complete.
*/</font>
@@ -553,13 +553,13 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
*/</font>
<font color=#7F0055>void</font> doneGetSignalMask(IToken token, Exception error, <font color=#7F0055>int</font> dont_stop, <font color=#7F0055>int</font> dont_pass, <font color=#7F0055>int</font> pending);
}
-
+
<font color=#3F5FBF>/**
- * Set process or thread signal mask.
+ * Set process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* <font color=#7F9FBF>@param</font> dont_stop - bit-set of signals that should not suspend execution of the context.
- * By default, debugger suspends a context before it receives a signal.
+ * By default, debugger suspends a context before it receives a signal.
* <font color=#7F9FBF>@param</font> dont_pass - bit-set of signals that should not be delivered to the context.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
@@ -581,7 +581,7 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken getEnvironment(DoneGetEnvironment done);
-
+
<font color=#3F5FBF>/**
* Call-back interface to be called when "getEnvironment" command is complete.
*/</font>
@@ -594,15 +594,15 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@param</font> directory - initial value of working directory for the process.
* <font color=#7F9FBF>@param</font> file - process image file.
* <font color=#7F9FBF>@param</font> command_line - command line arguments for the process.
- * <font color=#7F9FBF>@param</font> environment - list of environment variables for the process.
- * if null then default set of environment variables will be used.
+ * <font color=#7F9FBF>@param</font> environment - list of environment variables for the process.
+ * if null then default set of environment variables will be used.
* <font color=#7F9FBF>@param</font> attach - if true debugger should be attached to the process.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken start(String directory, String file,
String[] command_line, String[] environment, <font color=#7F0055>boolean</font> attach, DoneStart done);
-
+
<font color=#3F5FBF>/**
* Call-back interface to be called when "start" command is complete.
*/</font>
@@ -624,10 +624,10 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#3F5FBF>/**
* Process event listener is notified when a process exits.
- * Event are reported only for processes that were started by 'start' command.
+ * Event are reported only for processes that were started by 'start' command.
*/</font>
<font color=#7F0055>interface</font> ProcessesListener {
-
+
<font color=#3F5FBF>/**
* Called when a process exits.
* <font color=#7F9FBF>@param</font> process_id - process context ID
diff --git a/docs/TCF Service - Registers.html b/docs/TCF Service - Registers.html
index 11892d390..d94a6da53 100644
--- a/docs/TCF Service - Registers.html
+++ b/docs/TCF Service - Registers.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Registers</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -67,11 +67,11 @@ multiple locations. This allows:
<li> to specify offset and size for get/set on large register groups
<li> to get/set truncated register values, e.g. only the low 32 bits of a 64-bit register
</ol>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -79,13 +79,13 @@ C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getContext &bull; <i>&lt;s
<p>The command retrieves context info for given context ID. A context corresponds to an
register, register group, register bit field, etc. Exact meaning of a context depends on the target.
Target agent should define contexts hierarchy that is:</p>
-
+
<ul type='disc'>
<li>Adequately reflects target hardware registers layout;
<li>Consistent with the lingo/terminology of the processor manuals;
<li>Intuitive to a user.
</ul>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -165,7 +165,7 @@ Service sends contextChanged event to notify changes in context data.</p>
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;named values list&gt;</i> ]
-
+
<i>&lt;named values list&gt;</i>
&rArr; <i>&lt;object: named value properties&gt;</i>
&rArr; <i>&lt;named values list&gt;</i> , <i>&lt;object: named value properties&gt;</i>
@@ -218,20 +218,20 @@ Service sends contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for registers access commands.</p>
-
+
<p>Parent context ID is usually a thread ID retrieved through Run Control Service or one
of context IDs retrieved by previous getChildren commands.
Contexts hierarchy can be simple plain list of registers, or it can form a tree of register groups, registers and bit fields.
It is up to target agent developers to choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -239,7 +239,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -247,16 +247,16 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
</font></b></pre>
<h3><a name='CmdSetRegister'>Set Register</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; set &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
<p>Writes value into given register context. Context ID must be one returned by getContexts.
Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -265,16 +265,16 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
of error.</p>
<h3><a name='CmdGetRegister'>Get Register</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; get &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>Reads register value from given register context. Context ID must be one returned by getContexts.
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
@@ -283,7 +283,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;s
of error. Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.</p>
<h3><a name='CmdSetMultiple'>Set Multiple Registers</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locations&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
@@ -293,7 +293,7 @@ C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locat
<i>&lt;location list&gt;</i>
&rArr; <i>&lt;location&gt;</i>
&rArr; <i>&lt;location list&gt;</i> , <i>&lt;location&gt;</i>
-
+
<i>&lt;location&gt;</i>
&rArr; [ <i>&lt;string: register context ID&gt;</i> , <i>&lt;int: offset in bytes&gt;</i> , <i>&lt;int: size in bytes&gt;</i> ]
</font></b></pre>
@@ -301,9 +301,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locat
<p>Writes value into given list of locations in registers. Each location is represented by 3-element array that consists of
context ID, offset in the context in bytes and value size in bytes.
Value is BASE64 encoded byte array of binary data. Byte array size should match the sum of location sizes.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -312,7 +312,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
of error.</p>
<h3><a name='CmdGetMultiple'>Get Multiple Registers</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locations&gt;</i> &bull;
@@ -322,7 +322,7 @@ C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locat
<i>&lt;location list&gt;</i>
&rArr; <i>&lt;location&gt;</i>
&rArr; <i>&lt;location list&gt;</i> , <i>&lt;location&gt;</i>
-
+
<i>&lt;location&gt;</i>
&rArr; [ <i>&lt;string: register context ID&gt;</i> , <i>&lt;int: offset in bytes&gt;</i> , <i>&lt;int: size in bytes&gt;</i> ]
</font></b></pre>
@@ -330,9 +330,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locat
<p>Reads register values from given list of locations in registers. Each location is represented by 3-element array that consists of
context ID, offset in the context in bytes and value size in bytes.
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
@@ -341,12 +341,12 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;s
of error. Value is BASE64 encoded byte array of binary data. Byte array size should match the sum of location sizes.</p>
<h3><a name='CmdSearch'>Search for Registers</a></h3>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
C &bull; &lt;token&gt; &bull; Registers &bull; search &bull; <i>&lt;string: start context ID&gt; &bull; &lt;object:filter properties&gt;</i> &bull;
</font></b></pre>
-<p>Search returns a path to each context with properties matching the filter. A path consists of a list of
+<p>Search returns a path to each context with properties matching the filter. A path consists of a list of
context ids starting with a direct child of the start context up to the found context.
Search is only supported for properties listed in the CanSearch property.
@@ -360,9 +360,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; search &bull; <i>&lt;string: star
</li>
</ul>
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context Paths&gt;</i> &bull;
@@ -370,7 +370,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context Path list&gt;</i> ]
-
+
<i>&lt;context Path list&gt;</i>
&rArr; <i>&lt;array of context IDs&gt;</i>
&rArr; <i>&lt;context Path list&gt;</i> , <i>&lt;array of context IDs&gt;</i>
@@ -404,17 +404,17 @@ R &bull; "1235" &bull; [["ID_G0"]] &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Registers service broadcasts notification events when registers contexts are changed, and when
a register content is altered by "set" commands.</p>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
E &bull; Registers &bull; contextChanged &bull;
E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* IRegisters service provides access to target CPU register values and properties.
@@ -449,7 +449,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
PROP_MEMORY_CONTEXT = "MemoryContext", <font color=#3F5FBF>/** String, the context ID of a memory context in which a memory mapped register is located */</font>
PROP_CAN_SEARCH = "CanSearch", <font color=#3F5FBF>/** Array of String, a list of attribute names which can be searched for starting on this context */</font>
PROP_ROLE = "Role"; <font color=#3F5FBF>/** String, the role the register plays in a program execution */</font>
-
+
<font color=#3F5FBF>/**
* Role property names.
*/</font>
@@ -459,7 +459,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
ROLE_FP = "FP", <font color=#3F5FBF>/** Register defining the current frame pointer location */</font>
ROLE_RET = "RET", <font color=#3F5FBF>/** Register used to store the return address for calls */</font>
ROLE_CORE = "CORE"; <font color=#3F5FBF>/** Indicates register or register groups which belong to the core state */</font>
-
+
<font color=#3F5FBF>/**
* Filter property names.
*/</font>
@@ -470,8 +470,8 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -497,7 +497,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -516,9 +516,9 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
- * RegistersContext objects represent register groups, registers and bit fields.
+ * RegistersContext objects represent register groups, registers and bit fields.
*/</font>
<font color=#7F0055>interface</font> RegistersContext {
<font color=#3F5FBF>/**
@@ -526,25 +526,25 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent context ID.
*/</font>
String getParentID();
-
+
<font color=#3F5FBF>/**
* Get context (register, register group, bit field) name.
* <font color=#7F9FBF>@return</font> context name.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get context description.
* <font color=#7F9FBF>@return</font> context description.
*/</font>
String getDescription();
-
+
<font color=#3F5FBF>/**
* Get context size in bytes.
* Byte arrays in get()/set() methods should be same size.
@@ -554,57 +554,57 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* @return context size in bytes.
*/</font>
<font color=#7F0055>int</font> getSize();
-
+
<font color=#3F5FBF>/**
* Check if context value can be read.
* <font color=#7F9FBF>@return</font> true if can read value of the context.
*/</font>
<font color=#7F0055>boolean</font> isReadable();
-
+
<font color=#3F5FBF>/**
* Check if reading the context (register) destroys its current value -
* it can be read only once.
* <font color=#7F9FBF>@return</font> true if read-once register.
*/</font>
<font color=#7F0055>boolean</font> isReadOnce();
-
+
<font color=#3F5FBF>/**
* Check if context value can be written.
* <font color=#7F9FBF>@return</font> true if can write value of the context.
*/</font>
<font color=#7F0055>boolean</font> isWriteable();
-
+
<font color=#3F5FBF>/**
* Check if register value can not be overwritten - every write counts.
* <font color=#7F9FBF>@return</font> true if write-once register.
*/</font>
<font color=#7F0055>boolean</font> isWriteOnce();
-
+
<font color=#3F5FBF>/**
- * Check if writing the context can change values of other registers.
+ * Check if writing the context can change values of other registers.
* <font color=#7F9FBF>@return</font> true if has side effects.
*/</font>
<font color=#7F0055>boolean</font> hasSideEffects();
-
+
<font color=#3F5FBF>/**
* Check if the register value can change even when target is stopped.
* <font color=#7F9FBF>@return</font> true if the register value can change at any time.
*/</font>
<font color=#7F0055>boolean</font> isVolatile();
-
+
<font color=#3F5FBF>/**
* Check if the register value is a floating-point value.
* <font color=#7F9FBF>@return</font> true if a floating-point register.
*/</font>
<font color=#7F0055>boolean</font> isFloat();
-
+
<font color=#3F5FBF>/**
* Check endianess of the context.
- * Big endian means decreasing numeric significance with increasing bit number.
+ * Big endian means decreasing numeric significance with increasing bit number.
* <font color=#7F9FBF>@return</font> true if big endian.
*/</font>
<font color=#7F0055>boolean</font> isBigEndian();
-
+
<font color=#3F5FBF>/**
* Check if the lowest numbered bit (i.e. bit #0 or bit #1 depending on
* getFirstBitNumber() value) should be shown to user as the left-most bit or
@@ -612,45 +612,45 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> true if the first bit is left-most bit.
*/</font>
<font color=#7F0055>boolean</font> isLeftToRight();
-
+
<font color=#3F5FBF>/**
* If the context has bit field children, bit positions of the fields
* can be zero-based or 1-based.
* <font color=#7F9FBF>@return</font> first bit position - 0 or 1.
*/</font>
<font color=#7F0055>int</font> getFirstBitNumber();
-
+
<font color=#3F5FBF>/**
- * If context is a bit field, get the field bit numbers in parent context.
+ * If context is a bit field, get the field bit numbers in parent context.
* <font color=#7F9FBF>@return</font> array of bit numbers.
*/</font>
<font color=#7F0055>int</font>[] getBitNumbers();
-
+
<font color=#3F5FBF>/**
* A context can have predefined names (mnemonics) for some its values.
* This method returns a list of such named values.
* <font color=#7F9FBF>@return</font> array of named values or null.
*/</font>
NamedValue[] getNamedValues();
-
+
<font color=#3F5FBF>/**
* Get the address of a memory mapped register.
* <font color=#7F9FBF>@return</font> address.
*/</font>
Number getMemoryAddress();
-
+
<font color=#3F5FBF>/**
- * Get the context ID of a memory context in which a memory mapped register is located.
+ * Get the context ID of a memory context in which a memory mapped register is located.
* <font color=#7F9FBF>@return</font> memory context ID.
*/</font>
String getMemoryContext();
-
+
<font color=#3F5FBF>/**
* Get a list of property names which can be searched for starting on this context
* <font color=#7F9FBF>@return</font> collection of property names.
*/</font>
Collection<String> canSearch();
-
+
<font color=#3F5FBF>/**
* Get the role the register plays in a program execution.
* <font color=#7F9FBF>@return</font> role name.
@@ -662,14 +662,14 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> map of all available context properties.
*/</font>
Map<String,Object> getProperties();
-
+
<font color=#3F5FBF>/**
* Read value of the context.
* <font color=#7F9FBF>@param</font> done - call back object.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken get(DoneGet done);
-
+
<font color=#3F5FBF>/**
* Set value of the context.
* <font color=#7F9FBF>@param</font> value - value to write into the context.
@@ -690,7 +690,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* A register context can have predefined names (mnemonics) for some its values.
- * NamedValue objects represent such values.
+ * NamedValue objects represent such values.
*/</font>
<font color=#7F0055>interface</font> NamedValue {
<font color=#3F5FBF>/**
@@ -698,20 +698,20 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> the value as an array of bytes.
*/</font>
byte[] getValue();
-
+
<font color=#3F5FBF>/**
* Get name (mnemonic) of the value.
* <font color=#7F9FBF>@return</font> value name.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get human readable description of the value.
* <font color=#7F9FBF>@return</font> value description.
*/</font>
String getDescription();
}
-
+
<font color=#3F5FBF>/**
* Read values of multiple locations in registers.
* <font color=#7F9FBF>@param</font> locs - array of data locations.
@@ -719,7 +719,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken getm(Location[] locs, DoneGet done);
-
+
<font color=#3F5FBF>/**
* Set values of multiple locations in registers.
* <font color=#7F9FBF>@param</font> locs - array of data locations.
@@ -734,7 +734,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>final class</font> Location {
<font color=#3F5FBF>/** Register context ID */</font>
- <font color=#7F0055>public final</font> String id;
+ <font color=#7F0055>public final</font> String id;
<font color=#3F5FBF>/** offset in the context, in bytes */</font>
<font color=#7F0055>public final int</font> offs;
@@ -761,7 +761,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>void</font> doneGet(IToken token, Exception error, byte[] value);
}
-
+
<font color=#3F5FBF>/**
* 'set' command call back interface.
*/</font>
@@ -801,7 +801,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/</font>
<font color=#7F0055>interface</font> RegistersListener {
@@ -810,12 +810,12 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* Most targets have static set of registers and register properties.
* Such targets never generate this event. However, some targets,
* for example, JTAG probes, allow user to modify register definitions.
- * Clients should flush all cached register context data.
+ * Clients should flush all cached register context data.
*/</font>
<font color=#7F0055>void</font> contextChanged();
<font color=#3F5FBF>/**
- * Called when register content was changed and clients
+ * Called when register content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached registers data.
* Not every change is notified - it is not possible,
diff --git a/docs/TCF Service - Run Control.html b/docs/TCF Service - Run Control.html
index ecdc40100..785770f04 100644
--- a/docs/TCF Service - Run Control.html
+++ b/docs/TCF Service - Run Control.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Run Control</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -50,9 +50,9 @@ Command and event parameters are encoded as zero terminated <a href='TCF Specifi
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
-
+
<p>All run control commands are fully asynchronous, which means they never wait until
context is in a particular state. For example, if single step command arrives when
context is running, it does not wait until it stops, but returns an error. If a command
@@ -66,13 +66,13 @@ to the command and intended destination was not reached. Client can know when an
why a context is suspended by listening to events.</p>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command retrieves context properties for given context ID.
-Exact meaning of context depends on the target.
+Exact meaning of context depends on the target.
A context can represent an execution thread, a process, an address space, etc.
A context can belong to a parent context. Contexts hierarchy can be simple
plain list or it can form a tree. It is up to target agent developers to choose
@@ -82,7 +82,7 @@ with same IDs, however, each service accesses its own subset of context's
attributes and functionality, which is relevant to that service.</p>
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;context data&gt;</i> &bull;
@@ -134,7 +134,7 @@ contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
@@ -145,23 +145,23 @@ C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getChildren &bull; <i>&lt
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;
<i>&lt;array of context IDs&gt;</i>
&rArr; null
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
</font></b></pre>
<h3><a name='CmdSuspend'>Suspend</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; suspend &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -169,9 +169,9 @@ C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; suspend &bull; <i>&lt;str
<p>The command suspends execution of given context. The command should fail if CanSuspend property of the context is false.
If context's IsContainer = true, the command is propagated to context's children. Only contexts with HasState = true
can be suspended.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -272,24 +272,24 @@ to context's children. Only contexts with HasState = true can be resumed.</p>
<code>RM_REVERSE_STEP_INTO_RANGE = 15</code> - reverse of <code>RM_STEP_INTO_RANGE</code>.
</li>
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdGetState'>Get State</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getState &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command retrieves current state of the context. The command should fail if HasState property of
the context is false.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;boolean: suspended&gt;</i> &bull;
<i>&lt;int: PC&gt;</i> &bull; <i>&lt;string: last state change reason&gt;</i> &bull; <i>&lt;state data&gt;</i> &bull;
@@ -315,24 +315,24 @@ a generic client might be able to handle it better. Predefined reasons are:</p>
<p>Context state properties can contain any data relevant to context state.
Definition of state properties depends on a target.</p>
-
+
<h3><a name='CmdTerminate'>Terminate</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; terminate &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command terminates execution of given context. The command should fail if CanTerminate
property of the context is false.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; RunControl &bull; contextAdded &bull; <i>&lt;array of context data&gt;</i> &bull;
@@ -355,7 +355,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<i>&lt;array of context data&gt;</i>
&rArr; null
&rArr; [ <i>&lt;context data list&gt;</i> ]
-
+
<i>&lt;context data list&gt;</i>
&rArr; <i>&lt;object: context data&gt;</i>
&rArr; <i>&lt;context data list&gt;</i> , <i>&lt;object: context data&gt;</i>
@@ -411,7 +411,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
PROP_CAN_TERMINATE = "CanTerminate";
<font color=#3F5FBF>/**
- * Context resume modes.
+ * Context resume modes.
*/</font>
<font color=#7F0055>static final int</font>
RM_RESUME = 0,
@@ -430,7 +430,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* State change reason of a context.
* Reason can be any text, but if it is one of predefined strings,
- * a generic client might be able to handle it better.
+ * a generic client might be able to handle it better.
*/</font>
<font color=#7F0055>static final</font> String
REASON_USER_REQUEST = "Suspended",
@@ -445,8 +445,8 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -465,14 +465,14 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Retrieve children of given context.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getChildren(String parent_context_id, DoneGetChildren done);
-
+
<font color=#3F5FBF>/**
* Client callback interface for getContexts().
*/</font>
@@ -484,7 +484,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, RunControlError error, Context[] contexts);
}
-
+
<font color=#3F5FBF>/**
* A context corresponds to an execution thread, process, address space, etc.
* A context can belong to a parent context. Contexts hierarchy can be simple
@@ -492,17 +492,17 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/</font>
<font color=#7F0055>interface</font> RunControlContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Retrieve context ID.
* Same as getProperties().get("ID")
*/</font>
String getID();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Retrieve parent context ID.
* Same as getProperties().get("ParentID")
*/</font>
@@ -514,21 +514,21 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> Map of context properties.
*/</font>
Map&lt;String,Object&gt; getProperties();
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_IS_CONTAINER.
* Executing resume or suspend command on a container causes all its children to resume or suspend.
* <font color=#7F9FBF>@return</font> value of PROP_IS_CONTAINER.
*/</font>
<font color=#7F0055>boolean</font> isContainer();
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_HAS_STATE.
- * Only context that has a state can be resumed or suspended.
+ * Only context that has a state can be resumed or suspended.
* <font color=#7F9FBF>@return</font> value of PROP_HAS_STATE.
*/</font>
<font color=#7F0055>boolean</font> hasState();
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_CAN_SUSPEND.
* Value 'true' means suspend command is supported by the context,
@@ -538,29 +538,29 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> value of PROP_CAN_SUSPEND.
*/</font>
<font color=#7F0055>boolean</font> canSuspend();
-
+
<font color=#3F5FBF>/**
* Utility method to read a 'mode' bit in context property PROP_CAN_RESUME.
* Value 'true' means resume command is supported by the context,
* however the method does not check that the command can be executed successfully in
* the current state of the context. For example, the command still can fail if context is
* already resumed.
- * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
- * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_RESUME.
+ * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
+ * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_RESUME.
*/</font>
<font color=#7F0055>boolean</font> canResume(<font color=#7F0055>int</font> mode);
-
+
<font color=#3F5FBF>/**
* Utility method to read a 'mode' bit in context property PROP_CAN_COUNT.
* Value 'true' means resume command with count other then 1 is supported by the context,
* however the method does not check that the command can be executed successfully in
* the current state of the context. For example, the command still can fail if context is
* already resumed.
- * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
- * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_COUNT.
+ * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
+ * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_COUNT.
*/</font>
<font color=#7F0055>boolean</font> canCount(<font color=#7F0055>int</font> mode);
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_CAN_TERMINATE.
* Value 'true' means terminate command is supported by the context,
@@ -585,7 +585,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken suspend(DoneCommand done);
-
+
<font color=#3F5FBF>/**
* Send a command to resume a context.
* Also resumes children if context is a container.
@@ -595,7 +595,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken resume(<font color=#7F0055>int</font> mode, <font color=#7F0055>int</font> count, DoneCommand done);
-
+
<font color=#3F5FBF>/**
* Send a command to terminate a context.
* <font color=#7F9FBF>@param</font> done - command result call back object.
@@ -603,10 +603,10 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
*/</font>
IToken terminate(DoneCommand done);
}
-
+
<font color=#7F0055>class</font> RunControlError <font color=#7F0055>extends</font> Exception {
}
-
+
<font color=#7F0055>interface</font> DoneGetState {
<font color=#7F0055>void</font> doneGetState(IToken token, Exception error, <font color=#7F0055>boolean</font> suspended, String pc,
String reason, Map&lt;String,Object&gt; params);
@@ -626,7 +626,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@param</font> listener - run control event listener to add.
*/</font>
<font color=#7F0055>void</font> addListener(RunControlListener listener);
-
+
<font color=#3F5FBF>/**
* Remove run control event listener.
* <font color=#7F9FBF>@param</font> listener - run control event listener to remove.
@@ -675,14 +675,14 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Called when target simultaneously suspends multiple threads in a container
* (process, core, etc.).
- *
+ *
* <font color=#7F9FBF>@param</font> context - ID of a context responsible for the event. It can be container ID or
* any one of container children, for example, it can be thread that hit "suspend all" breakpoint.
* Client expected to move focus (selection) to this context.
* <font color=#7F9FBF>@param</font> pc - program counter of the context.
* <font color=#7F9FBF>@param</font> reason - human readable description of suspend reason.
* <font color=#7F9FBF>@param</font> params - additional target specific data about suspended context.
- * <font color=#7F9FBF>@param</font> suspended_ids - full list of all contexts that were suspended.
+ * <font color=#7F9FBF>@param</font> suspended_ids - full list of all contexts that were suspended.
*/</font>
<font color=#7F0055>void</font> containerSuspended(String context, String pc,
String reason, Map&lt;String,Object&gt; params, String[] suspended_ids);
@@ -690,8 +690,8 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Called when target simultaneously resumes multiple threads in a container (process,
* core, etc.).
- *
- * <font color=#7F9FBF>@param</font> context_ids - full list of all contexts that were resumed.
+ *
+ * <font color=#7F9FBF>@param</font> context_ids - full list of all contexts that were resumed.
*/</font>
<font color=#7F0055>void</font> containerResumed(String[] context_ids);
diff --git a/docs/TCF Service - Stack Trace.html b/docs/TCF Service - Stack Trace.html
index 33bf4933b..c0ee6d360 100644
--- a/docs/TCF Service - Stack Trace.html
+++ b/docs/TCF Service - Stack Trace.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Stack Trace</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -42,11 +42,11 @@ and event parameters are encoded as zero terminated <a href='TCF Specification.h
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; StackTrace &bull; getContext &bull; <i>&lt;array of context IDs&gt;</i> &bull;
@@ -54,7 +54,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; StackTrace &bull; getContext &bull; <i>&lt;
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -65,17 +65,17 @@ Command allows to query multiple contexts at once.
Stack Trace context represents single stack frame.
If target supports more then one stack per thread,
each stack is also represented by a separate context.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
-R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;array of context data&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
+R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;array of context data&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
<i>&lt;array of context data&gt;</i>
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context data list&gt;</i> ]
-
+
<i>&lt;context data list&gt;</i>
&rArr; <i>&lt;context data&gt;</i>
&rArr; <i>&lt;context data list&gt;</i> , <i>&lt;context data&gt;</i>
@@ -121,7 +121,7 @@ Cached context data should by flushed when parent thread is resumed.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; StackTrace &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
@@ -131,12 +131,12 @@ Parent context usually corresponds to an execution thread.
Some targets have more then one stack. In such case children of a thread
are stacks, and stack frames are deeper in the hierarchy - they can be
retrieved with additional getChildren commands.</p>
-
+
<p>The command will fail if parent thread is not suspended.
Client can use Run Control service to suspend a thread.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -144,7 +144,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -153,11 +153,11 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<h2><a name='Events'>Events</a></h2>
-
+
<p>No events are currently defined for Stack Trace service.</p>
-
+
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> IStackTrace <font color=#7F0055>extends</font> IService {
@@ -179,11 +179,11 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<font color=#3F5FBF>/**
* Retrieve context info for given context IDs.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; array of context IDs.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; array of context IDs.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String[] id, DoneGetContext done);
@@ -206,10 +206,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
* Some targets have more then one stack. In such case children of a thread
* are stacks, and stack frames are deeper in the hierarchy - they can be
* retrieved with additional getChildren commands.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
@@ -227,55 +227,55 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
- * StackTraceContext represents stack trace objects - stacks and stack frames.
+ * StackTraceContext represents stack trace objects - stacks and stack frames.
*/</font>
<font color=#7F0055>interface</font> StackTraceContext {
-
+
<font color=#3F5FBF>/**
* Get Context ID.
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent context ID.
*/</font>
String getParentID();
-
+
<font color=#3F5FBF>/**
* Get context name - if context represents a stack.
* <font color=#7F9FBF>@return</font> context name or null.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get memory address of this frame.
* <font color=#7F9FBF>@return</font> address or null if not a stack frame.
*/</font>
Number getFrameAddress();
-
+
<font color=#3F5FBF>/**
* Get program counter saved in this stack frame -
* it is address of instruction to be executed when the function returns.
* <font color=#7F9FBF>@return</font> program counter or null if not a stack frame.
*/</font>
Number getProgramCounter();
-
+
<font color=#3F5FBF>/**
* Get number of function arguments for this frame.
* <font color=#7F9FBF>@return</font> function arguments count.
*/</font>
<font color=#7F0055>int</font> getArgumentsCount();
-
+
<font color=#3F5FBF>/**
* Get address of function arguments area in memory.
* <font color=#7F9FBF>@return</font> function arguments address or null if not available.
*/</font>
Number getArgumentsAddress();
-
+
<font color=#3F5FBF>/**
* Get stack frame level.
* <font color=#7F9FBF>@return</font> frame level or 0 if not a stack frame.
diff --git a/docs/TCF Service - Streams.html b/docs/TCF Service - Streams.html
index 3d166f869..5a3378a13 100644
--- a/docs/TCF Service - Streams.html
+++ b/docs/TCF Service - Streams.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Streams</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -58,18 +58,18 @@
can continue data processing concurrently with data transmission.
<li> Multicast: multiple clients can receive data from same stream.
<li> Subscription model: clients are required to expressed interest in particular streams by subscribing for the service.
- <li> Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
+ <li> Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
</ul>
<p> Command and event parameters are encoded as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdSubscribe'>Subscribe</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; subscribe &bull; <i>&lt;string: stream source type&gt;</i> &bull;
</font></b></pre>
@@ -80,7 +80,7 @@ For example, <a href='TCF Service - Processes.html'>Processes Service</a> define
"Processes" strem source that represents standard input/output streams.
Subscribers receive notifications when a stream of given type is created or disposed.
Subscribers are required to respond with 'read' or 'disconnect' commands as necessary.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -95,13 +95,13 @@ If not disconnected, subscriber is required to send 'read' commands as necessary
</p>
<h3><a name='CmdUnsubscribe'>Unsubscribe</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; unsubscribe &bull; <i>&lt;string: stream source type&gt;</i> &bull;
</font></b></pre>
<p>Unsubscribe the client from given stream source type.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -109,7 +109,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdRead'>Read</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; read &bull; <i>&lt;string: stream ID&gt;</i> &bull; <i>&lt;int: size&gt;</i> &bull;
</font></b></pre>
@@ -127,7 +127,7 @@ Pending 'read' commands will be executed in same order as issued.
Client can delay sending of 'read' command if it is not ready to receive more data,
however, delaying for too long can cause stream buffer overflow and lost of data.
.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -138,12 +138,12 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;string: data&gt;</i> &bull; <i>&lt;e
<li><dt><code><b>data</b></code> <dd>BASE64 encoded bytes that were read from the stream.
<li><dt><code><b>lost size</b></code> <dd>Number of bytes that were lost because of buffer overflow.
-1 means unknown number of bytes were lost. if both 'lost_size' and 'data.length' are non-zero then lost bytes are considered
- located right before read bytes.
+ located right before read bytes.
<li><dt><code><b>EOS</b></code> <dd>true if end of stream was reached.
</ul>
<h3><a name='CmdWrite'>Write</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; write &bull; <i>&lt;string: stream ID&gt;</i> &bull; <i>&lt;int: size&gt;</i> &bull; <i>&lt;string: data&gt;</i> &bull;
</font></b></pre>
@@ -159,7 +159,7 @@ Remote peer will continue to process other commands while 'write' command is pen
Client can send more 'write' commands without waiting for the first command to complete.
Doing that improves communication channel bandwidth utilization.
Pending 'write' commands will be executed in same order as issued.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -167,13 +167,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdEOS'>End of Stream</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; eos &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
<p>The command sends End Of Stream marker to a stream. No more writing to the stream is allowed after that.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -181,7 +181,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdConnect'>Connect</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; connect &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
@@ -189,7 +189,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; connect &bull; <i>&lt;string
<p>The command connects client to a stream. Some data might be dropped from the stream by the time "connect" command is executed.
Client should be able to re-sync with stream data if it wants to read from such stream.
If a client wants to read a stream from the beginning it should use "subscribe" command instead of "connect"</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -197,14 +197,14 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdDisconnect'>Disconnect</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; disconnect &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
<p>The command disconnects client from a stream. Note that disconnect does not destroy the stream, client on other channels can
continue reading or writing the stream.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -212,10 +212,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Streams service sends events when a stream is created or disposed. Only clients with active subscribtion will recceive the events.
Clients can change their subscription with <b>subscribe</b> and <b>unsubscribe</b> commands.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; Streams &bull; created &bull; <i>&lt;string: stream type&gt;</i> &bull; <i>&lt;string: stream ID&gt;</i> &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -234,16 +234,16 @@ Stream types and context IDs are defined by services that use Streams service to
E &bull; Streams &bull; disposed &bull; <i>&lt;string: stream type&gt;</i> &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
<p>
-Sent when a stream is disposed.
+Sent when a stream is disposed.
"stream type" - source type of the stream.
"stream ID" - ID of the stream.
</p>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> IStreams extends IService {
-
+
<font color=#3F5FBF>/**
* Service name.
*/</font>
@@ -251,14 +251,14 @@ Sent when a stream is disposed.
<font color=#3F5FBF>/**
* Clients can implement StreamsListener interface to be notified
- * when a stream is created or disposed. The interface is registered with 'subscribe' command.
- *
+ * when a stream is created or disposed. The interface is registered with 'subscribe' command.
+ *
* When new stream is created, client must decide if it is interested in that particular stream instance.
* If not interested, client should send 'disconnect' command to allow remote peer to free resources and bandwidth.
* If not disconnected, client is required to send 'read' commands as necessary to prevent stream buffer overflow.
*/</font>
<font color=#7F0055>interface</font> StreamsListener {
-
+
<font color=#3F5FBF>/**
* Called when a new stream is created.
* <font color=#7F9FBF>@param</font> stream_type - source type of the stream.
@@ -268,15 +268,15 @@ Sent when a stream is disposed.
* Stream types and context IDs are defined by services that use Streams service to transmit data.
*/</font>
<font color=#7F0055>void</font> created(String stream_type, String stream_id, String context_id);
-
+
<font color=#3F5FBF>/**
- * Called when a stream is disposed.
+ * Called when a stream is disposed.
* <font color=#7F9FBF>@param</font> stream_type - source type of the stream.
* <font color=#7F9FBF>@param</font> stream_id - ID of the stream.
*/</font>
<font color=#7F0055>void</font> disposed(String stream_type, String stream_id);
}
-
+
<font color=#3F5FBF>/**
* Clients must subscribe for one or more stream types to be able to send or receive stream data.
* Subscribers receive notifications when a stream of given type is created or disposed.
@@ -287,7 +287,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken subscribe(String stream_type, StreamsListener listener, DoneSubscribe done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'subscribe' command.
*/</font>
@@ -303,7 +303,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken unsubscribe(String stream_type, StreamsListener listener, DoneUnsubscribe done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'unsubscribe' command.
*/</font>
@@ -325,7 +325,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken read(String stream_id, <font color=#7F0055>int</font> size, DoneRead done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'read' command.
*/</font>
@@ -337,7 +337,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@param</font> lost_size - number of bytes that were lost because of buffer overflow.
* 'lost_size' -1 means unknown number of bytes were lost.
* if both 'lost_size' and 'data.length' are non-zero then lost bytes are considered
- * located right before read bytes.
+ * located right before read bytes.
* <font color=#7F9FBF>@param</font> data - bytes read from the stream.
* <font color=#7F9FBF>@param</font> eos - true if end of stream was reached.
*/</font>
@@ -358,7 +358,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken write(String stream_id, <font color=#7F0055>byte</font>[] buf, <font color=#7F0055>int</font> offset, <font color=#7F0055>int</font> size, DoneWrite done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'write' command.
*/</font>
@@ -370,15 +370,15 @@ Sent when a stream is disposed.
*/</font>
<font color=#7F0055>void</font> doneWrite(IToken token, Exception error);
}
-
+
<font color=#3F5FBF>/**
- * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
+ * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
* <font color=#7F9FBF>@param</font> stream_id - ID of the stream.
* <font color=#7F9FBF>@param</font> done - command result call back object.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken eos(String stream_id, DoneEOS done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'eos' command.
*/</font>
@@ -398,7 +398,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken disconnect(String stream_id, DoneDisconnect done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'disconnect' command.
*/</font>
diff --git a/docs/TCF Service - System Monitor.html b/docs/TCF Service - System Monitor.html
index fe1175703..2763e684f 100644
--- a/docs/TCF Service - System Monitor.html
+++ b/docs/TCF Service - System Monitor.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - System Monitor</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -49,11 +49,11 @@ as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -62,7 +62,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getContext &bull; <i>&lt;
A context corresponds to an execution thread or process.
Context IDs are valid across TCF services, so it is allowed to issue 'SysMonitor.getContext'
command with a context that was obtained from another service.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -84,176 +84,176 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;c
<li><code><b><font face="Courier New" size=2 color=#333399>"ParentID" : <i>&lt;string&gt;</i></font></b></code>
- parent context ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CWD" : <i>&lt;string&gt;</i></font></b></code>
- current working directory of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Root" : <i>&lt;string&gt;</i></font></b></code>
- the process's root directory (as set by chroot).
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UID" : <i>&lt;int&gt;</i></font></b></code>
- User ID of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UGID" : <i>&lt;int&gt;</i></font></b></code>
- Group ID of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UserName" : <i>&lt;string&gt;</i></font></b></code>
- user name of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"GroupName" : <i>&lt;string&gt;</i></font></b></code>
- group name of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PID" : <i>&lt;int&gt;</i></font></b></code>
- system process ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"File" : <i>&lt;string&gt;</i></font></b></code>
- executable file of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"State" : <i>&lt;string&gt;</i></font></b></code>
- one character from the string "RSDZTW" where R is running, S is
sleeping in an interruptible wait, D is waiting in uninterruptible
disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
is paging.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PPID" : <i>&lt;int&gt;</i></font></b></code>
- system ID of the parent process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PGRP" : <i>&lt;int&gt;</i></font></b></code>
- the process group ID of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Session" : <i>&lt;int&gt;</i></font></b></code>
- the session ID of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"TTY" : <i>&lt;int&gt;</i></font></b></code>
- the tty the process uses.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"TGID" : <i>&lt;int&gt;</i></font></b></code>
- the process group ID of the process which currently owns the tty that
the process is connected to.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"TracerPID" : <i>&lt;int&gt;</i></font></b></code>
- ID of a process that has attached this process for tracing or debugging.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Flags" : <i>&lt;int&gt;</i></font></b></code>
- the kernel flags word of the process. Details depend on the kernel.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"MinFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of minor faults the process has made which have not
required loading a memory page from disk.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CMinFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of minor faults that the process's waited-for children have made.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"MajFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of major faults the process has made which have required
loading a memory page from disk.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CMajFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of major faults that the process's waited-for children
have made.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UTime" : <i>&lt;int&gt;</i></font></b></code>
- the number of milliseconds that this process has been scheduled in user mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"STime" : <i>&lt;int&gt;</i></font></b></code>
- the number of milliseconds that this process has been scheduled in kernel mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CUTime" : <i>&lt;int&gt;</i></font></b></code>
- the number of jiffies that this process's waited-for children have
been scheduled in user mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CSTime" : <i>&lt;int&gt;</i></font></b></code>
- the number of jiffies that this process's waited-for children have
been scheduled in user mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Priority" : <i>&lt;int&gt;</i></font></b></code>
- the standard nice value.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Nice" : <i>&lt;int&gt;</i></font></b></code>
- the nice value.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"ITRealValue" : <i>&lt;int&gt;</i></font></b></code>
- the time in milliseconds before the next SIGALRM is sent to the process
due to an interval timer.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StartTime" : <i>&lt;int&gt;</i></font></b></code>
- the time in milliseconds the process started after system boot.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"VSize" : <i>&lt;int&gt;</i></font></b></code>
- virtual memory size in bytes.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PSize" : <i>&lt;int&gt;</i></font></b></code>
- memory pages size in bytes.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"RSS" : <i>&lt;int&gt;</i></font></b></code>
- resident Set Size: number of pages the process has in real memory,
minus used for administrative purposes. This is just the pages which
count towards text, data, or stack space. This does not include
pages which have not been demand-loaded in, or which are swapped out.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"RLimit" : <i>&lt;int&gt;</i></font></b></code>
- current limit in bytes on the rss of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CodeStart" : <i>&lt;int&gt;</i></font></b></code>
- the address above which program text can run.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CodeEnd" : <i>&lt;int&gt;</i></font></b></code>
- the address below which program text can run.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StackStart" : <i>&lt;int&gt;</i></font></b></code>
- the address of the start of the stack.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Signals" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of pending signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"SigBlock" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of blocked signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"SigIgnore" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of ignored signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"SigCatch" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of caught signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"WChan" : <i>&lt;int&gt;</i></font></b></code>
- this is the "channel" in which the process is waiting. It is the
address of a system call, and can be looked up in a namelist if you
need a textual name.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"NSwap" : <i>&lt;int&gt;</i></font></b></code>
- number of pages swapped.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CNSwap" : <i>&lt;int&gt;</i></font></b></code>
- cumulative NSwap for child processes.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"ExitSignal" : <i>&lt;int&gt;</i></font></b></code>
- signal to be sent to parent when this process exits.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Processor" : <i>&lt;int&gt;</i></font></b></code>
- CPU number last executed on.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"RTPriority" : <i>&lt;int&gt;</i></font></b></code>
- real-time scheduling priority.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Policy" : <i>&lt;int&gt;</i></font></b></code>
- scheduling policy.
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for System Monitor commands.</p>
-
+
<p>Parent context ID can be null &ndash; to retrieve top level of the hierarchy, can be one
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;
@@ -261,22 +261,22 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
</font></b></pre>
<h3><a name='CmdGetCommandLine'>Get Command Line</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getCommandLine &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of progess command line arguments.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of string&gt;</i> &bull;
@@ -284,22 +284,22 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;string list&gt;</i> ]
-
+
<i>&lt;string list&gt;</i>
&rArr; <i>&lt;string&gt;</i>
&rArr; <i>&lt;string list&gt;</i> , <i>&lt;string&gt;</i>
</font></b></pre>
<h3><a name='CmdGetEnvironment'>Get Environment</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getEnvironment &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of progess environment variables.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of string&gt;</i> &bull;
</font></b></pre>
@@ -309,7 +309,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<p>No events are currently defined for System Monitor service.</p>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> ISysMonitor <font color=#7F0055>extends</font> IService {
@@ -317,8 +317,8 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -337,10 +337,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<font color=#3F5FBF>/**
* Retrieve children of given context.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getChildren(String parent_context_id, DoneGetChildren done);
@@ -356,171 +356,171 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
* Context property names.
*/</font>
<font color=#7F0055>static final</font> String
<font color=#3F5FBF>/** The TCF context ID */</font>
PROP_ID = "ID",
-
+
<font color=#3F5FBF>/** The TCF parent context ID */</font>
PROP_PARENTID = "ParentID",
-
+
<font color=#3F5FBF>/** Current working directory of the process */</font>
PROP_CWD = "CWD",
-
+
<font color=#3F5FBF>/** The process's root directory (as set by chroot) */</font>
PROP_ROOT = "Root",
-
+
<font color=#3F5FBF>/** User ID of the process owner */</font>
PROP_UID = "UID",
-
+
<font color=#3F5FBF>/** Group ID of the process owner */</font>
PROP_UGID = "UGID",
-
+
<font color=#3F5FBF>/** User name of the process owner */</font>
PROP_USERNAME = "UserName",
-
+
<font color=#3F5FBF>/** Group name of the process owner */</font>
PROP_GROUPNAME = "GroupName",
-
+
<font color=#3F5FBF>/** System process ID */</font>
PROP_PID = "PID",
-
+
<font color=#3F5FBF>/** Executable file of the process */</font>
PROP_FILE = "File",
-
+
<font color=#3F5FBF>/** One character from the string "RSDZTW" where R is running, S is
* sleeping in an interruptible wait, D is waiting in uninterruptible
* disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
* is paging.*/</font>
PROP_STATE = "State",
-
+
<font color=#3F5FBF>/** System ID of the parent process */</font>
PROP_PPID = "PPID",
-
+
<font color=#3F5FBF>/** The process group ID of the process */</font>
PROP_PGRP = "PGRP",
-
+
<font color=#3F5FBF>/** The session ID of the process */</font>
PROP_SESSION = "Session",
-
+
<font color=#3F5FBF>/** The tty the process uses */</font>
PROP_TTY = "TTY",
-
+
<font color=#3F5FBF>/** The process group ID of the process which currently owns the tty that
* the process is connected to. */</font>
PROP_TGID = "TGID",
-
+
<font color=#3F5FBF>/** ID of a process that has attached this process for tracing or debugging */</font>
PROP_TRACERPID = "TracerPID",
-
+
<font color=#3F5FBF>/** The kernel flags word of the process. Details depend on the kernel */</font>
PROP_FLAGS = "Flags",
-
+
<font color=#3F5FBF>/** The number of minor faults the process has made which have not
* required loading a memory page from disk */</font>
PROP_MINFLT = "MinFlt",
-
+
<font color=#3F5FBF>/** The number of minor faults that the process's waited-for children have made */</font>
- PROP_CMINFLT = "CMinFlt",
-
+ PROP_CMINFLT = "CMinFlt",
+
<font color=#3F5FBF>/** The number of major faults the process has made which have required
* loading a memory page from disk */</font>
PROP_MAJFLT = "MajFlt",
-
+
<font color=#3F5FBF>/** The number of major faults that the process's waited-for children
* have made */</font>
PROP_CMAJFLT = "CMajFlt",
-
+
<font color=#3F5FBF>/** The number of milliseconds that this process has been scheduled in user mode */</font>
PROP_UTIME = "UTime",
-
+
<font color=#3F5FBF>/** The number of milliseconds that this process has been scheduled in kernel mode */</font>
PROP_STIME = "STime",
-
+
<font color=#3F5FBF>/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */</font>
PROP_CUTIME = "CUTime",
-
+
<font color=#3F5FBF>/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */</font>
PROP_CSTIME = "CSTime",
-
+
<font color=#3F5FBF>/** The standard nice value */</font>
PROP_PRIORITY = "Priority",
-
+
<font color=#3F5FBF>/** The nice value */</font>
PROP_NICE = "Nice",
-
+
<font color=#3F5FBF>/** The time in milliseconds before the next SIGALRM is sent to the process
* due to an interval timer */</font>
PROP_ITREALVALUE = "ITRealValue",
-
+
<font color=#3F5FBF>/** The time in milliseconds the process started after system boot */</font>
PROP_STARTTIME = "StartTime",
-
+
<font color=#3F5FBF>/** Virtual memory size in bytes */</font>
PROP_VSIZE = "VSize",
-
+
<font color=#3F5FBF>/** Memory pages size in bytes */</font>
PROP_PSIZE = "PSize",
-
+
<font color=#3F5FBF>/** Resident Set Size: number of pages the process has in real memory,
* minus used for administrative purposes. This is just the pages which
* count towards text, data, or stack space. This does not include
* pages which have not been demand-loaded in, or which are swapped out */</font>
PROP_RSS = "RSS",
-
+
<font color=#3F5FBF>/** Current limit in bytes on the rss of the process */</font>
PROP_RLIMIT = "RLimit",
-
+
<font color=#3F5FBF>/** The address above which program text can run */</font>
PROP_CODESTART = "CodeStart",
-
+
<font color=#3F5FBF>/** The address below which program text can run */</font>
PROP_CODEEND = "CodeEnd",
-
+
<font color=#3F5FBF>/** The address of the start of the stack */</font>
PROP_STACKSTART = "StackStart",
-
+
<font color=#3F5FBF>/** The bitmap of pending signals */</font>
PROP_SIGNALS = "Signals",
-
+
<font color=#3F5FBF>/** The bitmap of blocked signals */</font>
PROP_SIGBLOCK = "SigBlock",
-
+
<font color=#3F5FBF>/** The bitmap of ignored signals */</font>
PROP_SIGIGNORE = "SigIgnore",
-
+
<font color=#3F5FBF>/** The bitmap of caught signals */</font>
PROP_SIGCATCH = "SigCatch",
-
+
<font color=#3F5FBF>/** This is the "channel" in which the process is waiting. It is the
* address of a system call, and can be looked up in a name list if you
* need a textual name */</font>
PROP_WCHAN = "WChan",
-
+
<font color=#3F5FBF>/** Number of pages swapped */</font>
PROP_NSWAP = "NSwap",
-
+
<font color=#3F5FBF>/** Cumulative NSwap for child processes */</font>
PROP_CNSWAP = "CNSwap",
-
+
<font color=#3F5FBF>/** Signal to be sent to parent when this process exits */</font>
PROP_EXITSIGNAL = "ExitSignal",
-
+
<font color=#3F5FBF>/** CPU number last executed on */</font>
PROP_PROCESSOR = "Processor",
-
+
<font color=#3F5FBF>/** Real-time scheduling priority */</font>
PROP_RTPRIORITY = "RTPriority",
-
+
<font color=#3F5FBF>/** Scheduling policy */</font>
PROP_POLICY = "Policy";
-
-
+
+
<font color=#3F5FBF>/**
* A context corresponds to an execution thread, process, address space, etc.
* A context can belong to a parent context. Contexts hierarchy can be simple
@@ -528,113 +528,113 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/</font>
<font color=#7F0055>interface</font> SysMonitorContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context ID.
* Same as getProperties().get(&ldquo;ID&rdquo;)
*/</font>
String getID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get parent context ID.
* Same as getProperties().get(&ldquo;ParentID&rdquo;)
*/</font>
String getParentID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process group ID.
* Same as getProperties().get(&ldquo;PGRP&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPGRP();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process ID.
* Same as getProperties().get(&ldquo;PID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process parent ID.
* Same as getProperties().get(&ldquo;PPID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPPID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process TTY group ID.
* Same as getProperties().get(&ldquo;TGID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getTGID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get tracer process ID.
* Same as getProperties().get(&ldquo;TracerPID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getTracerPID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user ID.
* Same as getProperties().get(&ldquo;UID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getUID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user name.
* Same as getProperties().get(&ldquo;UserName&rdquo;)
*/</font>
String getUserName();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user group ID.
* Same as getProperties().get(&ldquo;UGID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getUGID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user group name.
* Same as getProperties().get(&ldquo;GroupName&rdquo;)
*/</font>
String getGroupName();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get process state.
* Same as getProperties().get(&ldquo;State&rdquo;)
*/</font>
String getState();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process virtual memory size in bytes.
* Same as getProperties().get(&ldquo;VSize&rdquo;)
*/</font>
<font color=#7F0055>long</font> getVSize();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process virtual memory page size in bytes.
* Same as getProperties().get(&ldquo;PSize&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPSize();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get number of memory pages in process resident set.
* Same as getProperties().get(&ldquo;RSS&rdquo;)
*/</font>
<font color=#7F0055>long</font> getRSS();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context executable file.
* Same as getProperties().get(&ldquo;File&rdquo;)
*/</font>
String getFile();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context current file system root.
* Same as getProperties().get(&ldquo;Root&rdquo;)
*/</font>
String getRoot();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context current working directory.
* Same as getProperties().get(&ldquo;CWD&rdquo;)
*/</font>
@@ -646,21 +646,21 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
*/</font>
Map&lt;String,Object&gt; getProperties();
}
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context command line.
*/</font>
IToken getCommandLine(String id, DoneGetCommandLine done);
-
+
<font color=#7F0055>interface</font> DoneGetCommandLine {
<font color=#7F0055>void</font> doneGetCommandLine(IToken token, Exception error, String[] cmd_line);
}
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context environment variables.
*/</font>
IToken getEnvironment(String id, DoneGetEnvironment done);
-
+
<font color=#7F0055>interface</font> DoneGetEnvironment {
<font color=#7F0055>void</font> doneGetEnvironment(IToken token, Exception error, String[] environment);
}
diff --git a/docs/TCF Services.html b/docs/TCF Services.html
index 61b1aadf6..4b84061ff 100644
--- a/docs/TCF Services.html
+++ b/docs/TCF Services.html
@@ -5,12 +5,12 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services</h1>
-
+
<p>Copyright (c) 2007 Wind River Systems, Inc. Made available under the EPL v1.0
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
-
+
<h2>Table of Contents</h2>
<ul>
<li><a href='#VersionHistory'>Version History</a>
@@ -48,13 +48,13 @@ For example, <a href='TCF Service - Memory.html'>Memory Service</a> defines grou
reading and writing target memory.
Service definitions are not part of the <a href='TCF Specification.html'>framework specification</a>, and new services
are expected to be defined by developers of tools and target agents.
-Defenitions of standard services are provided to achieve certain level of compatibility between tools and targets.
-
+Defenitions of standard services are provided to achieve certain level of compatibility between tools and targets.
+
<h2><a name='Syntax'>Syntax Rules Notation</a></h2>
-
+
<p>Format of the protocol messages is defined by syntax rules. Syntax is described
using a simple variant of Backus-Naur Form. In particular:</p>
-
+
<ul type='disc'>
<li>Italic lower case words in a courier font, enclosed into angular brackets, are
used to denote syntactic categories, for example:&nbsp;<b><i><font face="Courier New" size=2 color=#333399>&lt;token&gt;.
@@ -62,12 +62,12 @@ using a simple variant of Backus-Naur Form. In particular:</p>
of the category, for example: <b><i><font face="Courier New" size=2 color=#333399>&lt;int:
error code&gt;</font></i></b> has same meaning as <b><i><font face="Courier New" size=2 color=#333399>&lt;int&gt;</font></i></b>,
but denotes that the integer number used to indicate an "error code".
-
+
<li>A syntax rule consists of a category designation followed by one or more syntax
definitions for the category. The category name and each definition are placed on
separate lines, bullets are used to denote definitions, for example:
</ul>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;chars&gt;</i>
&rArr; <i>&lt;char&gt;</i>
@@ -76,17 +76,17 @@ using a simple variant of Backus-Naur Form. In particular:</p>
<ul type='disc'>
<li>Spaces are added for readability only and they are not part of the syntax.
-
+
<li>All text in the category definition, other than categories and spaces, is UTF-8
based representation of a message bytes.
-
- <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
+
+ <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
</ul>
<h2><a name='ErrorFormat'>Error Report Format</a></h2>
<p>Most of TCF standard services use same format for error reporting:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;error report&gt;</i>
&rArr;
@@ -205,4 +205,4 @@ same way as "OTHER".</p>
</body>
</html>
-
+
diff --git a/docs/TCF Specification.html b/docs/TCF Specification.html
index e808f0b5e..5b443425c 100644
--- a/docs/TCF Specification.html
+++ b/docs/TCF Specification.html
@@ -4,14 +4,14 @@
<title>Target Communication Framework Specification</title>
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Specification</h1>
-
+
<p>Copyright (c) 2007, 2008 Wind River Systems, Inc. Made available under the EPL v1.0
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
<h1>Table of Contents</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -70,28 +70,28 @@
<td>2009-03-04
<td>Added N message
</table>
-
+
<h1><a name='Overview'>Overview</a></h1>
-
+
<p>Today almost every device software development tool on the market has its own method
of communication with target system. Communication methods often require individual setup,
configuration and maintenance, impose unnecessary limitations.
Target Communication Framework goal is to establish common ground in
the area of communication protocols between development tools and embedded devices.</p>
-
+
<p>The goal is a single protocol used to communicate between all tools and targets:</p>
<p><img src='TCF Specification Image1.png'></p>
-
+
<h2><a name='Goals'>Goals</a></h2>
-
+
<ul type='disc'>
<li>Universal, simple, lightweight, vendor agnostic framework for tools and targets
to communicate for purpose of debugging, profiling, code patching and other device
software development needs.
-
+
<li>Single configuration per target (not per tool per target as today in most cases),
or no configuration when possible.
-
+
<li>Minimal overhead and footprint on target side.
</ul>
@@ -100,125 +100,125 @@ the area of communication protocols between development tools and embedded devic
<dl>
<dt><b>Peer:</b> <dd>communication endpoint. Both hosts and targets are called peers. A
peer can act as a client or a server depending on services it implements.
-
+
<dt><b>Service:</b> <dd>group of related commands, events and semantic define a service.
A service can be discovered, added or removed as a group at communication endpoint.
-
+
<dt><b>Message:</b> <dd>a packet of data, formatted according to framework specification
and transmitted over communication channel.
-
+
<dt><b>Channel:</b> <dd>communication link connecting two endpoints (peers). A single
channel may be used to communicate with multiple services. Multiple channels may
be used to connect the same peers, however no command or event ordering is guaranteed
across channels.
-
+
<dt><b>Command:</b> <dd>command is a message sent to remote peer in order to request some
predefined action there.
-
+
<dt><b>Result:</b> <dd>result is a message sent as a response to a command.
-
+
<dt><b>Event:</b> <dd>event is a message sent to all interested parties in order to notify
them about state changes.
</dl>
<h2><a name='Requirements'>Requirements</a></h2>
-
+
<ul type='disc'>
<li>Simple and extensible protocol.
-
+
<li>Small footprint on the target.
-
+
<li>Fully asynchronous, message based communication.
-
+
<li>Two ways of message routing:
<ul>
<li>Point to point request/response (command/result) communication.
-
+
<li>Subscription based broadcast of notifications (events).
- </ul>
-
+ </ul>
+
<li>Full duplex, symmetric communication: both host and target should be able to send
commands and events at same time, though ability to establish communication channel
can be limited to host only.
-
+
<li>For each communication channel between two peers, the framework should preserve
order of commands, results and events.
-
+
<li>Support for slow and high latency connections.
-
+
<li>Transport protocol agnostic. The framework should work well, at least, on top
of: TCP/IP, UDP, USB, RS232 and JTAG.
-
+
<li>The framework should support multiplexing, that is, single target device shared
between multiple tools at same time. To reduce footprint on the target, multiplexing
can be implemented on host if needed.
-
+
<li>Dynamic discovery of participating targets and hosts. No configuration when possible.
-
+
<li>Dynamic discovery of available services (high level protocols, command sets).
Clients can query for available services.
-
+
<li>Services can be added and removed dynamically.
-
+
<li>Framework should define a set of common high level interfaces (services). For
example: flow control, memory access, registers access, up-load mechanism, kernel
awareness, run control, target file system, console, flash programming. Implementation
of these interfaces is optional, but if provided it will support much wider compatibility
with various tools.
-
+
<li>Framework should be layered in such a way so it is possible to use different transport
- medias (e.g. TCP/IP, RS232, USB, etc) without any changes to individual services.
+ medias (e.g. TCP/IP, RS232, USB, etc) without any changes to individual services.
In other words, transport implementation should be services agnostic, and services
implementation should be transport agnostic.
-
+
<li>Each service defines how marshalling is done for command, result and event arguments.
This allows existing target agents to remain unchanged.
-
+
<li>Framework should define a preferred marshalling mechanism that new services can
use.
-
+
<li>The definition of services (groups of related commands and events) is separate
from the definition of the framework itself. The framework provides unified communication
mechanism, while services use it to communicate with its clients.
-
+
<li>Anybody (including 3rd parties) can add services without having to modify communication
protocol or framework software.
-
+
<li>The framework should support tunneling through a proxy. Proxy may be used, for
example:
-
+
<ul type='circle'>
- <li>to bridge different transport protocols, like TCP and RS232;
-
- <li>to make a RS232 or USB target connection accessible from multiple hosts;
-
+ <li>to bridge different transport protocols, like TCP and RS232;
+
+ <li>to make a RS232 or USB target connection accessible from multiple hosts;
+
<li>to access targets behind firewalls or otherwise not directly accessible
</ul>
-
+
<li>A proxy should be able to provide services in addition to those implemented by
a target. Such distribution of services allows target services to be implemented on
a host, thereby reducing the footprint on the target. For example, debug information,
stack back trace or OS awareness can be implemented by a proxy on a host. To provide
this functionality, proxy services would typically use low-level target services,
like memory access.
-
+
<li>Supports of concurrent requests. Maximum number of concurrent requests (window
size) can be limited on target side. Simple agents only have to support window size
of 1. Framework should maintain a queue of additional requests, so tools don't need
to know the window size. This may only be relevant for certain transport protocols
e.g. UDP.
-
+
<li>Events can be broadcasted at any time, i.e. no polling should be required.
-
+
<li>Protocol should support a standard mechanism of sending data larger than MTU.
</ul>
-
+
<h2><a name='Syntax'>Syntax Rules Notation</a></h2>
-
+
<p>Format of the protocol messages is defined by syntax rules. Syntax is described
using a simple variant of Backus-Naur Form. In particular:</p>
-
+
<ul type='disc'>
<li>Italic lower case words in a courier font, enclosed into angular brackets, are
used to denote syntactic categories, for example: <b><i><font face="Courier New" size=2 color=#333399>&lt;token&gt;.
@@ -226,7 +226,7 @@ using a simple variant of Backus-Naur Form. In particular:</p>
of the category, for example: <b><i><font face="Courier New" size=2 color=#333399>&lt;int:
error code&gt;</font></i></b> has same meaning as <b><i><font face="Courier New" size=2 color=#333399>&lt;int&gt;</font></i></b>,
but denotes that the integer number used to indicate an &ldquo;error code&rdquo;.
-
+
<li>A syntax rule consists of a category designation followed by one or more syntax
definitions for the category. The category name and each definition are placed on
separate lines, bullets are used to denote definitions, for example:
@@ -237,13 +237,13 @@ using a simple variant of Backus-Naur Form. In particular:</p>
</font></b></pre>
<li>Spaces are added for readability only and they are not part of the syntax.
-
+
<li>All text in the category definition, other then categories and spaces, is UTF-8
based representation of a message bytes.
-
- <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
+
+ <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
</ul>
-
+
<h1><a name='Design'>Framework Software Design Considerations</a></h1>
<p>The framework will be packaged, distributed and installed on a host as separate
@@ -251,7 +251,7 @@ product. It should be installed as system service and require no configuration f
most common case &ndash; target connected over TCP or UDP on a local network. For more complicated
setup, framework should have easily accessible and user friendly GUI with all relevant
configuration options.</p>
-
+
<p>Framework should use a dynamic discovery protocol to locate targets and other hosts
running instances of the framework when possible, and maintain a dynamic list of available
communication endpoints, as well as lists of services available at each endpoint.
@@ -261,49 +261,49 @@ JTAG to a remote host. It should also be possible to add target configuration ma
Development tools will access this data through the Locator Service API and use it,
for example, to present a user a list of available targets that have capabilities
needed by a particular tool.</p>
-
+
<p>Framework should provide software libraries to be used by tools and target agents
developers. The libraries should be available at least for ANSI C and Java. On host
side, at least Windows, Solaris and Linux must be supported. Libraries will provide
APIs for low-level communication protocol, Locator Service, preferred marshaling and
predefined common services.</p>
-
+
<p>The proposed target communication protocol is text-based. It allows extensions,
which define messages with blocks of binary data, but it is not a recommended data
formatting, and its usage is supposed to be limited. Text-based protocols have both
advantages and disadvantages in compare with binary protocols.</p>
-
+
<p>Advantages:</p>
-
+
<ul type='disc'>
<li>The software for text-based protocols is easier to develop and debug since they
use a relatively human-friendly communication.
-
+
<li>It is possible to use huge selection of existing tools and library routines to
view, edit, validate, and transform text-based data.
-
+
<li>Text based definition is in line with current trend in Internet protocols: most
popular protocols such as SMTP and HTTP are text-based.
</ul>
-
+
<p>Disadvantages:</p>
-
+
<ul type='disc'>
<li>Text-based protocols usually need more bytes to store numerical data than binary
protocols do.
-
+
<li>Parsing of text-based data is not efficient compared to parsing of binary data
since text-based data is usually not stored in a way similar to how it is stored in
computer memory.
-
+
<li>It is seldom possible to read only part of a text-based message since the exact
byte offset to a data item is generally not known.
</ul>
-
+
<p>A possible alternative to consider is binary, variable length encoding like BaseStream.</p>
-
+
<h2><a name='Concurrency'>Concurrency</a></h2>
-
+
<p>Concurrent asynchronous communication is much faster then synchronous, because
it alleviates communication channel latency and allows better bandwidth utilization.
But it also requires proper design of framework software. Concurrency, in general,
@@ -316,7 +316,7 @@ execution path is strictly contained in predefined subset of code (compartment),
no code, except for reentrant libraries, is executed by multiple threads. Each compartment
has a message queue and other threads communicate with the compartment thread by posting
messages to the queue.</p>
-
+
<p>Framework APIs are designed to be compatible with the compartment threading model.
Hence the API functions do not contain any thread synchronization primitives to protect
against multiple threads using the functions. All framework APIs belong to a single
@@ -329,15 +329,15 @@ such as Java, this is typically done by a single callback object argument contai
both the data and the function. The result listener is called asynchronously when
the job is done. This approach is commonly known as asynchronous<b>, </b>event-driven<b>
</b>or<b> </b>callback-based<b> </b>programming<b>.</b></p>
-
+
<p>One important characteristic of an asynchronous code is that the methods defined
by the user will often be called from within the framework itself, rather than from
the user's application code. The framework often plays the role of the main program
in coordinating and sequencing application activity. This phenomenon is called Inversion
of Control (also known as the Hollywood Principle - "Don't call us, we'll call you").</p>
-
+
<h2><a name='Reflection'>Reflection</a></h2>
-
+
<p>Communication between development tools and embedded devices must allow a host
to collect target side data and build a reflection of target state. Reflection is
usually incomplete &ndash; a subset of all remote data. Reflection is always delayed &ndash; it
@@ -345,36 +345,36 @@ represents a remote peer state in the past. Reflection can be updated by polling
data changes or by listening to events (event is communication message that is sent
asynchronously by a peer to notify others about state change). Reflection is correct
if it represents a state that actually did happen on remote peer.</p>
-
+
<p>Reflection is coherent if it is exactly equal to subset of peer state at a single
moment of time and that moment of time is not too far in the past. Non-coherent reflection
can have parts of data representing peer state at different moments of time. Coherent
reflection is more valuable for a user, because non-coherent reflection can have logically
conflicting data if that data was collected at different time.</p>
-
+
<p>Traditionally, debuggers would ensure coherence of state reflection by collecting
data only while target is suspended, and flushing all (or most) reflection data (reducing
observed subset to zero) when target is resumed. This approach does not work well
for multithreaded, multicore or real time targets. Maintaining correctness and coherence
of a non-empty reflection while target is running requires additional support from
target agent, communication software and debugger itself.</p>
-
+
<p>Since remote peer state is changing over time, coherent reflection can be built
only if:</p>
-
+
<ul type='disc'>
<li>Observed subset of state is properly selected and dynamically re-selected. Observing
too much can overflow communication channel. Observing too little has little value
for a user.
-
+
<li>Observer is listening to all relevant events.
-
+
<li>Events are coming in exactly same order as corresponding changes happen.
-
+
<li>Events are properly ordered relative to other messages that carry state data.
-
+
<li>All changes in observed subset of peer state are reported by events.
-
+
<li>All event messages must either contain a complete description of a change or they
all should not contain any state data at all. If client is getting some data from
events and required to retrieve new values of other changed data by using other means
@@ -383,24 +383,24 @@ only if:</p>
Sending deltas with events is usually more efficient then using data retrieval commands
to update reflection.
</ul>
-
+
<h2><a name='Ordering'>Message ordering</a></h2>
-
+
<p>The transmission order of commands, results and events is important, it coveys
valuable information about target state transitions and it should be preserved when
possible. Consider an example:</p>
-
+
<p>Client transmits: </p>
-
+
<pre>
Command X=2
</pre>
<p>Then, as result of some activity of another client or the target itself, X is assigned
value 3.</p>
-
+
<p>Target transmits:</p>
-
+
<pre>
Event X=3
Result X=2
@@ -414,12 +414,12 @@ will have no clue what to show &ndash; 2 or 3. In fact, the client will have to
decision about each message it receives: either trust message data as correct last
known target state, or assume the message came in out-of-order and ignore it, or re-request
the information from the target.</p>
-
+
<p>Note that re-requesting data from the target, in general, does not solve the problem
of interpretation of messages when order is not preserved. For example, after sending
a request to read value of X, X could change at about the same time, and client could
receive:</p>
-
+
<pre>
Event X=2
Result X=3
@@ -431,10 +431,10 @@ last one. A client could assume value of X unknown every time it receives a noti
of X change, and then re-request the data again. But this is expensive and, if events
coming in frequently, client can end up in infinite loop re-requesting the data again
and again, and it will never have trustworthy data about current target state.</p>
-
+
<p>Developers should be careful when using multithreading or multiple queues in software
design &ndash; it can easily cause message reordering.</p>
-
+
<p>The framework itself is required to preserve message order. However, if for whatever
reason a target agent cannot preserve message order, the result will be that clients
of the service can receive messages in the wrong order. When this is the case it should
@@ -442,57 +442,57 @@ be well documented, so tools developers are aware and can make the best of the s
In most cases it will not cause any trouble, but there is no perfect way to restore
actual sequence of events and maintain data coherency after ordering was lost, and
in some cases it can severely impact tool functionality and user experience.</p>
-
+
<h1><a name='Transport'>Transport Layer</a></h1>
-
+
<p>Tools are required to be transport protocol agnostic, so most of the layer functionality
is used internally by framework and is not exposed to clients. This layer maintains
a collection of transport protocol handlers. Each handler is designed to provide:</p>
-
+
<ul type='disc'>
<li>Enumeration of available peers, including both automatically discovered and manually
configured peers. Handler fires notification events when peers are added or removed.
Enumeration can be implemented by scanning JTAG chain, by broadcasting special UDP
packet and waiting for responses, by communicating with ICE hardware, or by any other
suitable means.
-
+
<li>Bidirectional point-to-point communication of data packets. Packets are arrays
of bytes of arbitrary size.
Transport handler and underlying protocol are responsible for adding all necessary
control data, headers, error checking bits, addresses, fragmentation/defragmentation,
flow control, transmission retries and whatever necessary to ensure lossless, order-preserving
delivery of packets.
-
+
<li>Configuration UI should allow user to inspect and modify properties of both manually
configured and automatically discovered peers, setup new peers, view connections status
and statistics.
</ul>
-
+
<p>Existing service discovery protocols can be used together with the framework, for
example:</p>
-
+
<ul type='disc'>
<li>Zero Configuration Networking (Zeroconf), see <a href='http://www.zeroconf.org/'>http://www.zeroconf.org</a>;
-
+
<li>Service Location Protocol (SLP), developed by the IETF;
-
+
<li>Jini, which is Sun's Java-base approach to service discovery, see <a href='http://www.sun.com/jini'>http://www.sun.com/jini</a>;
-
+
<li>Salutation, developed by an open industry consortium, called the Salutation Consortium;
-
+
<li>Microsoft's Universal Plug and Play (UPnP), see <a href='http://www.upnp.org/'>http://www.upnp.org</a>;
-
+
<li>Bluetooth Service Discovery Protocol (SDP).
</ul>
-
+
<p>Service discovery protocols, as well as transport protocols will be supported by
framework plug-ins, they are not part of framework code itself, and they can be developed
by 3rd parties. Note that existing discovery protocols define term &ldquo;service&rdquo; differently
- as an independent communication endpoint (usually a TCP/IP port). In this document
it is called &ldquo;peer&rdquo; (host, target, communication endpoint), and a peer can provide
multiple services over single communication channel.</p>
-
+
<p>Using of standard discovery protocols should be optional, because it can potentially
cause conflict or interference between development tools and application being developed
over a use of same standard protocol &ndash; devices software often includes implementation
@@ -507,19 +507,19 @@ of the communication channel for a particular peer, and for sending and receivin
data packets. The protocol define contents of a part of a packet, the rest of the
packet is treated as array of bytes at this level. The communication protocol implementation
also provides:</p>
-
+
<ul type='disc'>
<li>Multiplexing &ndash; opening multiple channels per peer.
-
+
<li>Proxy &ndash; packet forwarding in behalf of other hosts.
</ul>
-
+
<p>Protocol defines three packet types: commands (requests), results (responses),
and events. Each packet consists of several protocol defined control fields followed
by byte array of data. Binary representation of control fields is a sequence of zero
terminated ASCII strings. Format of data array depends on a service. We recommend
using framework preferred marshaling for data formatting.</p>
-
+
<p>Syntax:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;message&gt;</i>
@@ -530,37 +530,37 @@ using framework preferred marshaling for data formatting.</p>
</font></b></pre>
<h2><a name='ProtocolCommands'>Commands</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;command&gt;</i>
&rArr; C &bull; <i>&lt;token&gt; </i>&bull; <i>&lt;service name&gt; </i>&bull; <i>&lt;command name&gt; </i>&bull; <i>&lt;byte array: arguments&gt;</i>
</font></b></pre>
<p>Command packets start with string &ldquo;C&rdquo;.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;token&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Token is unique string generated by framework for each command. It is used to match
results to commands.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;service name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Service name is used to identify a service that handles the command, it is same
string as returned by Service.getName().</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;command name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Command name interpretation depends on a service.</p>
-
+
<p>A command should always be answered with result packed. Result does not have to
be positive &ndash; it can include an error code, or it can be special "N" result that indicates that command was not recognized,
but there always must be one. Since client
@@ -574,7 +574,7 @@ unlimited number of requests, since this will use resources in forms of memory t
store the requests and time to process them.</p>
<h2><a name='ProtocolResults'>Results</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;result&gt;</i>
&rArr; N &bull; <i>&lt;token&gt;</i> &bull;
@@ -587,23 +587,23 @@ result, and &ldquo;N&rdquo; if command is not recognized. Receiving of &ldquo;R&
There should be exactly one &ldquo;R&rdquo; or &ldquo;N&rdquo; result for each command. In addition, command execution can produce any number of
intermediate &ldquo;P&rdquo; results. &ldquo;P&rdquo; results can be sent before &ldquo;R&rdquo;, and it can serve, for
example, as command execution progress report when execution takes long time.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;token&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Token should match token field of one of the pending commands that produced the result.</p>
<h2><a name='ProtocolEvents'>Events</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;event&gt;</i>
&rArr; E &bull; <i>&lt;service name&gt;</i> &bull; <i>&lt;event name&gt;</i> &bull; <i>&lt;byte array: event data&gt;</i>
</font></b></pre>
<p>Event packets start with string &ldquo;E&rdquo;.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;service name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
@@ -611,14 +611,14 @@ example, as command execution progress report when execution takes long time.</p
<p>Service name identifies a service that fired event, same string as returned by
Service.getName().</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;event name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Event name meaning depends on a service.</p>
-
+
<p>Events are used to notify clients about changes in peer state. Services should
provide sufficient variety of events for clients to track remote peer state without
too much of polling. Clients, interested in a particular aspect of the target state,
@@ -637,7 +637,7 @@ force clients to poll for changes and can also degrade performance. A balanced a
is the best.</p>
<h2><a name='ProtocolFlowControl'>Flow Control</a> </h2>
-
+
<p>It often happens that one side of communication channel produces messages faster
then they can be transmitted over the channel or can be consumed by another side.
This will cause channel traffic congestion (flooding). Framework will deal with the
@@ -660,14 +660,14 @@ indicate level of congestion. When a peer receives flow control message with con
it should try to reduce its transmition speed.</p>
<h2><a name='ProtocolExamples'>Message Examples</a></h2>
-
+
<p>Examples use simplified command arguments and result data. See service description
for actual data formats.</p>
-
+
<p>Executing <b><i>suspend</i></b> command from <b><i>RunControl</i></b> service:</p>
-
+
<p>&nbsp;</p>
-
+
<pre>
Send : C 1 RunControl suspend &ldquo;Thread1&rdquo;
Receive: E RunControl suspended &ldquo;Thread1&rdquo;
@@ -675,7 +675,7 @@ Receive: R 1 &ldquo;Success&rdquo;
</pre>
<p>Same command, but target was already suspended:</p>
-
+
<pre>
Receive: E RunControl suspended &ldquo;Thread1&rdquo;
&hellip;
@@ -685,7 +685,7 @@ Receive: R 2 &ldquo;Already suspended&rdquo;
<p>Same command, but target was suspended (by another client) after sending the command,
but before command was executed: </p>
-
+
<pre>
Receive: E RunControl running &ldquo;Thread1&rdquo;
&hellip;
@@ -695,40 +695,40 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
</pre>
<h2><a name='API'>Framework API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
- *
+ *
* Class Protocol provides static methods to access Target Communication Framework root objects:
* 1. the framework event queue and dispatch thread;
* 2. local instance of Locator service, which maintains a list of available targets;
* 3. list of open communication channels.
*/</font>
<font color=#7F0055>public class</font> Protocol {
-
+
<font color=#7F0055>private static</font> IEventQueue <i>event_queue</i>;
-
+
<font color=#3F5FBF>/**
* Before TCF can be used it should be given an object implementing IEventQueue interface.
* The implementation maintains a queue of objects implementing Runnable interface and
* executes <code>run</code> methods of that objects in a sequence by a single thread.
* The thread in referred as TCF event dispatch thread. Objects in the queue are called TCF events.
* Executing <code>run</code> method of an event is also called dispatching of event.
- *
+ *
* Only few methods in TCF APIs are thread safe - can be invoked from any thread.
- * If a method description does not say "can be invoked from any thread" explicitly -
+ * If a method description does not say "can be invoked from any thread" explicitly -
* the method must be invoked from TCF event dispatch thread. All TCF listeners are
* invoked from the dispatch thread.
- *
+ *
* <font color=#7F9FBF>@param</font> event_queue - IEventQueue implementation.
*/</font>
<font color=#7F0055>public static void</font> setEventQueue(IEventQueue event_queue);
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> instance of IEventQueue that should be used for TCF events.
*/</font>
<font color=#7F0055>public static</font> IEventQueue getEventQueue();
-
+
<font color=#3F5FBF>/**
* Returns true if the calling thread is TCF dispatch thread.
* Use this call to ensure that a given task is being executed (or not being)
@@ -738,7 +738,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@return</font> true if running on the dispatch thread.
*/</font>
<font color=#7F0055>public static boolean</font> isDispatchThread();
-
+
<font color=#3F5FBF>/**
* Causes runnable to have its run
* method called in the dispatch thread of the framework.
@@ -753,7 +753,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* method should be executed asynchronously.</font>
*/</font>
<font color=#7F0055>public static void</font> invokeLater(Runnable runnable);
-
+
<font color=#3F5FBF>/**
* Causes runnable to have its run
* method called in the dispatch thread of the framework.
@@ -765,21 +765,21 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>public static void</font> invokeAndWait(Runnable runnable)
<font color=#7F0055>throws</font> InterruptedException;
-
+
<font color=#3F5FBF>/**
* Get instance of the framework locator service.
* The service can be used to discover available remote peers.
- *
+ *
* @return instance of ILocator.
*/</font>
<font color=#7F0055>public static</font> ILocator getLocator();
-
+
<font color=#3F5FBF>/**
* Return an array of all open channels.
* @return an array of IChannel
*/</font>
<font color=#7F0055>public static</font> IChannel[] getOpenChannels();
-
+
<font color=#3F5FBF>/**
* Interface to be implemented by clients willing to be notified when
* new TCF communication channel is opened.
@@ -787,7 +787,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
<font color=#7F0055>public interface</font> ChannelOpenListener {
<font color=#7F0055>public void</font> onChannelOpen(IChannel channel);
}
-
+
<font color=#3F5FBF>/**
* Add a listener that will be notified when new channel is opened.
* @param listener
@@ -805,21 +805,21 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* The message is sent to all open communication channels &ndash; broadcasted.
*/</font>
<font color=#7F0055>public static void</font> sendEvent(String service, String name, byte[] data);
-
+
<font color=#3F5FBF>/**
* Call back after TCF messages sent by this host up to this moment are delivered
* to their intended target. This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need cross channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need cross channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
*/</font>
<font color=#7F0055>public static void</font> sync(Runnable done);
}
-
+
<font color=#3F5FBF>/**
* IChannel represents communication link connecting two endpoints (peers).
* The channel asynchroniously transmits messages: commands, results and events.
@@ -828,7 +828,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* ordering is guaranteed across channels.
*/</font>
<font color=#7F0055>public interface</font> IChannel {
-
+
<font color=#3F5FBF>/**
* Channel state IDs
*/</font>
@@ -836,12 +836,12 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
<i><font color=#0000C0>STATE_OPENNING</font></i> = 0,
<i><font color=#0000C0>STATE_OPEN</font></i> = 1,
<i><font color=#0000C0>STATE_CLOSED</font></i> = 2;
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> channel current state, see STATE_*
*/</font>
int getState();
-
+
<font color=#3F5FBF>/**
* Send command message to remote peer for execution. Commands can be queued
* locally before transmission. Sending commands too fast can fill up
@@ -851,17 +851,17 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@param</font> name - command name
* <font color=#7F9FBF>@param</font> args - command arguments encoded into array of bytes
* <font color=#7F9FBF>@param</font> done - call back object
- * <font color=#7F9FBF>@return</font> pending command handle
+ * <font color=#7F9FBF>@return</font> pending command handle
*/</font>
IToken sendCommand(IService service, String name, <font color=#7F0055>byte</font>[] args,
ICommandListener done);
-
+
<font color=#3F5FBF>/**
* Command listener interface. Clients implement this interface
* to receive command results.
*/</font>
<font color=#7F0055>interface</font> ICommandListener {
-
+
<font color=#3F5FBF>/**
* Called when progress message (intermediate result) is received
* from remote peer.
@@ -869,7 +869,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@param</font> data - progress message arguments encoded into array of bytes
*/</font>
<font color=#7F0055>void</font> progress(<font color=#7F0055>byte</font>[] data);
-
+
<font color=#3F5FBF>/**
* Called when command result received from remote peer.
* <font color=#7F9FBF>@param</font> token - command handle
@@ -884,7 +884,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> terminated(IToken token, Exception error);
}
-
+
<font color=#3F5FBF>/**
* Send result message to remote peer. Messages can be queued locally before
* transmission. Sending messages too fast can fill up communication channel
@@ -894,26 +894,26 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@param</font> results - result message arguments encoded into array of bytes
*/</font>
<font color=#7F0055>void</font> sendResult(IToken token, <font color=#7F0055>byte</font>[] results);
-
+
<font color=#3F5FBF>/**
* Get current level of outbound traffic congestion.
- *
+ *
* <font color=#7F9FBF>@return</font> integer value in range &ndash;100..100, where &ndash;100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
- *
+ *
* Note: in-bound traffic congestion is detected by framework and reported to
* remote peer without client needed to be involved. Clients willing to provide
* additional data about local congestion should register itself using
* Protocol.addCongestionMonitor().
*/</font>
int getCongestion();
-
+
<font color=#3F5FBF>/**
* Channel listener interface.
*/</font>
<font color=#7F0055>interface</font> IChannelListener {
-
+
<font color=#3F5FBF>/**
* Called when a channel is opened.
*/</font>
@@ -934,26 +934,26 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> congestionLevel(int level);
}
-
+
<font color=#3F5FBF>/**
* Subscribe a channel listener. The listener will be notified about changes of
* outbound traffic congestion level.
* <font color=#7F9FBF>@param</font> listener - channel listener implementation
*/</font>
<font color=#7F0055>void</font> addChannelListener(IChannelListener listener);
-
+
<font color=#3F5FBF>/**
* Remove a channel listener.
* <font color=#7F9FBF>@param</font> listener - channel listener implementation
*/</font>
<font color=#7F0055>void</font> removeChannelListener(IChannelListener listener);
-
+
<font color=#3F5FBF>/**
* Command server interface.
* This interface is to be implemented by service providers.
*/</font>
<font color=#7F0055>interface</font> ICommandServer {
-
+
<font color=#3F5FBF>/**
* Called every time a command is received from remote peer.
* <font color=#7F9FBF>@param</font> token - command handle
@@ -962,19 +962,19 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> command(IToken token, String name, <font color=#7F0055>byte</font>[] data);
}
-
+
<font color=#3F5FBF>/**
* Subscribe a command server. The server will be notified about command
* messages received through this channel for given service.
* <font color=#7F9FBF>@param</font> service - local service implementation
- * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
*/</font>
<font color=#7F0055>void</font> addCommandServer(IService service, ICommandServer listener);
-
+
<font color=#3F5FBF>/**
* Remove a command server.
* <font color=#7F9FBF>@param</font> service - local service implementation
- * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
*/</font>
<font color=#7F0055>void</font> removeCommandServer(IService service, ICommandServer listener);
@@ -993,31 +993,31 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> event(String name, <font color=#7F0055>byte</font>[] data);
}
-
+
<font color=#3F5FBF>/**
* Subscribe an event message listener for given service.
* <font color=#7F9FBF>@param</font> service - remote service proxy
- * <font color=#7F9FBF>@param</font> server - implementation of service event listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service event listener
*/</font>
<font color=#7F0055>void</font> addEventListener(IService service, IEventListener listener);
-
+
<font color=#3F5FBF>/**
* Unsubscribe an event message listener for given service.
* <font color=#7F9FBF>@param</font> service - remote service proxy
- * <font color=#7F9FBF>@param</font> server - implementation of service event listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service event listener
*/</font>
<font color=#7F0055>void</font> removeEventListener(IService service, IEventListener listener);
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> IPeer object representing local endpoint of communication channel.
*/</font>
IPeer getLocalPeer();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> IPeer object representing remote endpoint of communication channel.
*/</font>
IPeer getRemotePeer();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> collection of services available on local peer.
*/</font>
@@ -1054,14 +1054,14 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* Return null if implementation of the interface is not available.
*/</font>
&lt;V <font color=#7F0055>extends</font> IService> V getRemoteService(Class&lt;V> service_interface);
-
+
<font color=#3F5FBF>/**
* Install a service proxy object on this channel.
* This method can be called only from channel open call-back.
* It allows a client to extends TCF by adding proxy objects for non-standard services.
* Client, wishing to become service proxy provider, should register itself
* using either Protocol.addChannelOpenListener() or IChannel.addChannelListener().
- * It is not allowed to register more then one proxy for a given service interface.
+ * It is not allowed to register more then one proxy for a given service interface.
*/</font>
&lt;V <font color=#7F0055>extends</font> IService&gt; <font color=#7F0055>void</font> setServiceProxy(Class&lt;V&gt; service_interface, IService service_proxy);
@@ -1069,34 +1069,34 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* Close communication channel.
*/</font>
<font color=#7F0055>void</font> close();
-
+
<font color=#3F5FBF>/**
* Close channel in case of communication error.
* <font color=#7F9FBF>@param error</font> - cause of channel termination
*/</font>
<font color=#7F0055>void</font> terminate(Throwable error);
-
+
<font color=#3F5FBF>/**
* Redirect this channel to given peer using this channel remote peer locator service as a proxy.
* <font color=#7F9FBF>@param peer_</font> - peer that will become new remote communication endpoint of this channel
*/</font>
<font color=#7F0055>void</font> redirect(IPeer peer);
}
-
-
+
+
<font color=#3F5FBF>/**
* Object implemeting IToken interface is created by framework for every
* command sent over communication channel. It is used to match command to its
* results, and also can be used to cancel commands.
*/</font>
<font color=#7F0055>public</font> interface IToken {
-
+
<font color=#3F5FBF>/**
* Try to cancel a command associated with given token. A command can be
* canceled by this method only if it was not transmitted yet to remote peer
* for execution. Successfully canceled command does not produce any result
* messages.
- *
+ *
* <font color=#7F9FBF>@return</font> true if successful.
*/</font>
<font color=#7F0055>boolean</font> cancel();
@@ -1110,55 +1110,55 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
separate from protocol specification, a service designer can choose any data format that
suits the service requirements best. However, to promote better compatibility and to
simplify service design and implementation, we recommend to use <b>JSON</b> for data formatting.</p>
-
+
<p><b>JSON</b> (pronounced like the
English given name <i>Jason</i>), which stands for "<b>J</b>ava<b>S</b>cript <b>O</b>bject
<b>N</b>otation", is a lightweight, text-based, language-independent computer data
interchange format. <b>JSON</b> is a subset of the object literal notation of JavaScript
but its use does not require JavaScript.</p>
-
+
<p><b>JSON</b> represents data with the same basic types that programming languages
use. <b>JSON</b>'s basic types are:</p>
-
+
<ul type='disc'>
- <li>Number (integer, real, or floating-point)
-
- <li>String (double-quoted with backslash escapement)
-
+ <li>Number (integer, real, or floating-point)
+
+ <li>String (double-quoted with backslash escapement)
+
<li>Boolean (<code>true</code> and <code>false</code>)
-
- <li>Array (an ordered sequence of values)
-
- <li>Object (collection of key/value pairs)
-
- <li><code>null</code>
+
+ <li>Array (an ordered sequence of values)
+
+ <li>Object (collection of key/value pairs)
+
+ <li><code>null</code>
</ul>
-
+
<p>The structures used in most programming languages easily map directly onto JSON's
structures, and back again.</p>
-
+
<p>JSON maps data onto Unicode string. Then the string is mapped onto array of bytes
using UTF-8 encoding.</p>
-
+
<p>JSON specification:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;object&gt;</i>
&rArr; {}
&rArr; { <i>&lt;members&gt;</i> }
-
+
<i>&lt;members&gt;</i>
&rArr; <i>&lt;string&gt;</i> : <i>&lt;value&gt;</i>
&rArr; <i>&lt;members&gt;</i> , <i>&lt;string&gt;</i> : <i>&lt;value&gt;</i>
-
+
<i>&lt;array&gt;</i>
&rArr; []
&rArr; [ <i>&lt;elements&gt;</i> ]
-
+
<i>&lt;elements&gt;</i>
&rArr; <i>&lt;value&gt;</i>
&rArr; <i>&lt;elements</i>&gt; , <i>&lt;value&gt;</i>
-
+
<i>&lt;value&gt;</i>
&rArr; <i>&lt;string&gt;</i>
&rArr; <i>&lt;number&gt;</i>
@@ -1167,14 +1167,14 @@ using UTF-8 encoding.</p>
&rArr; <i>&lt;boolean&gt;</i>
&rArr; null
-<i>&lt;boolean&gt;</i>
+<i>&lt;boolean&gt;</i>
&rArr; true
&rArr; false
<i>&lt;string&gt;</i>
&rArr; ""
&rArr; " <i>&lt;chars&gt;</i> "
-
+
<i>&lt;chars&gt;</i>
&rArr; <i>&lt;char&gt;</i>
&rArr; <i>&lt;chars&gt; &lt;char&gt;</i>
@@ -1196,23 +1196,23 @@ using UTF-8 encoding.</p>
&rArr; &lt;<i>int&gt; &lt;fraction&gt;</i>
&rArr; &lt;<i>int&gt; &lt;exponent&gt;</i>
&rArr; &lt;<i>int&gt; &lt;fraction&gt; &lt;exponent&gt;</i>
-
+
<i>&lt;int&gt;</i>
&rArr; <i>&lt;digit&gt;</i>
- &rArr; &lt;<i>digit 1-9&gt; &lt;digits&gt;</i>
+ &rArr; &lt;<i>digit 1-9&gt; &lt;digits&gt;</i>
&rArr; - &lt;<i>digit&gt;</i>
&rArr; - &lt;<i>digit 1-9&gt; &lt;digits</i>&gt;
-
-<i>&lt;fraction&gt;</i>
- &rArr; . <i>&lt;digits&gt;</i>
-
-<i>&lt;exponent&gt;</i>
- &rArr; <i>&lt;e&gt;</i> <i>&lt;digits&gt;</i>
-
-<i>&lt;digits&gt;</i>
+
+<i>&lt;fraction&gt;</i>
+ &rArr; . <i>&lt;digits&gt;</i>
+
+<i>&lt;exponent&gt;</i>
+ &rArr; <i>&lt;e&gt;</i> <i>&lt;digits&gt;</i>
+
+<i>&lt;digits&gt;</i>
&rArr; <i>&lt;digit&gt;</i>
- &rArr; &lt;<i>digits&gt;</i> &lt;<i>digit&gt;</i>
-
+ &rArr; &lt;<i>digits&gt;</i> &lt;<i>digit&gt;</i>
+
<i>&lt;e&gt;</i>
&rArr; e
&rArr; e+
@@ -1224,11 +1224,11 @@ using UTF-8 encoding.</p>
</font></b></pre>
<p>See <a href='http://www.json.org/'>www.json.org</a> for more details.</p>
-
+
<h2><a name='JSONExamples'>Examples</a></h2>
-
+
<p>This is a JSON array containing two objects:</p>
-
+
<pre>
[
{
@@ -1251,7 +1251,7 @@ using UTF-8 encoding.</p>
}
]
</pre>
-
+
<h1><a name='Locator'>Locator Service</a></h1>
<p>Locator Service uses transport layer to search for peers and to collect data about
@@ -1304,7 +1304,7 @@ at services it implements (use IChannel.getRemoteServices() method to get a map
<h2><a name='LocatorCommands'>Locator Service Commands</a></h2>
<h3><a name='LocatorCommandRedirect'>redirect</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Locator &bull; redirect &bull; <i>&lt;string: peer ID&gt;</i> &bull;
</font></b></pre>
@@ -1317,9 +1317,9 @@ Locator service starts acting as a proxy.</p>
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
-
+
<h3><a name='LocatorCommandSync'>sync</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Locator &bull; sync &bull;
</font></b></pre>
@@ -1333,7 +1333,7 @@ for sync result a client makes sure that all commands, that were issued before s
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull;
</font></b></pre>
-
+
<h2><a name='LocatorEvents'>Locator Service Events</a></h2>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -1366,20 +1366,20 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
<font color=#3F5FBF>/**
* Base interface for all service interfaces. A client can get list of available services
* by calling IChannel.getLocalServices() and IChannel.getRemoteServices().
- *
+ *
* Remote services are represented by a proxy objects that implement service interfaces by
* translating method calls to TCF messages and sending them to a remote peer.
* When communication channel is open, TCF automatically creates proxies for standard services.
- * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
+ * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
*/</font>
<font color=#7F0055>public</font> interface IService {
-
+
<font color=#3F5FBF>/**
* Get unique name of this service.
*/</font>
String getName();
}
-
+
<font color=#3F5FBF>/**
* Both hosts and targets are represented by objects
* implementing IPeer interface. A peer can act as host or
@@ -1388,7 +1388,7 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* calling ILocator.getPeers
*/</font>
<font color=#7F0055>public interface</font> IPeer {
-
+
<font color=#7F0055>static final</font> String
<i><font color=#0000C0>ATTR_ID</font></i> = <font color=#2A00FF>"ID"</font>,
<i><font color=#0000C0>ATTR_NAME</font></i> = <font color=#2A00FF>"Name"</font>,
@@ -1398,33 +1398,33 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
<i><font color=#0000C0>ATTR_IP_ALIASES</font></i> = <font color=#2A00FF>"Aliases"</font>,
<i><font color=#0000C0>ATTR_IP_ADDRESSES</font></i> = <font color=#2A00FF>"Addresses"</font>,
<i><font color=#0000C0>ATTR_IP_PORT</font></i> = <font color=#2A00FF>"Port"</font>;
-
-
+
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> map of peer attributes
*/</font>
Map&lt;String, String&gt; getAttributes();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> peer unique ID, same as getAttributes().get(ATTR_ID)
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> peer name, same as getAttributes().get(ATTR_NAME)
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Same as getAttributes().get(ATTR_OS_NAME)
*/</font>
String getOSName();
-
+
<font color=#3F5FBF>/**
* Same as getAttributes().get(ATTR_TRANSPORT_NAME)
*/</font>
String getTransportName();
-
+
<font color=#3F5FBF>/**
* Open channel to communicate with this peer.
* Note: the channel is not fully open yet when this method returns.
@@ -1433,7 +1433,7 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
*/</font>
IChannel openChannel() <font color=#7F0055>throws</font> IOException;
}
-
+
<font color=#3F5FBF>/**
* ILocator service uses transport layer to search for peers and to collect data about
* peer's attributes and capabilities (services). Discovery mechanism depends on
@@ -1441,14 +1441,14 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* hosts, are added to local list of peers.
* Automatically discovered targets require no further configuration. Additional targets
* can be configured manually.
- *
+ *
* Clients should use Protocol.getLocator() to obtain local instance of ILocator,
* then ILocator.getPeers() can be used to get of available peers (hosts and targets).
*/</font>
<font color=#7F0055>public interface</font> ILocator <font color=#7F0055>extends</font> IService {
-
+
<font color=#7F0055>static final</font> String <i><font color=#0000C0>NAME</font></i> = <font color=#2A00FF>"Locator"</font>;
-
+
<font color=#3F5FBF>/**
* Auto-configuration command and response codes.
*/</font>
@@ -1460,38 +1460,38 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> Locator service name: "Locator"
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get map (ID -> IPeer) of available peers (hosts and targets).
* The method return cached (currently known to the framework) list of peers.
* The list is updated according to event received from transport layer
*/</font>
Map&lt;String,IPeer&gt; getPeers();
-
+
<font color=#3F5FBF>/**
* Redirect this service channel to given peer using this service as a proxy.
*/</font>
IToken redirect(String peer_id, DoneRedirect done);
-
+
<font color=#7F0055>interface</font> DoneRedirect {
<font color=#7F0055>void</font> doneRedirect(IToken token, Exception error);
}
-
+
<font color=#3F5FBF>/**
* Call back after TCF messages sent to this target up to this moment are delivered.
* This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
- *
+ *
* This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
*/</font>
IToken sync(DoneSync done);
-
+
<font color=#7F0055>interface</font> DoneSync {
<font color=#7F0055>void</font> doneSync(IToken token);
}
@@ -1500,17 +1500,17 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* Add a listener for locator service events.
*/</font>
<font color=#7F0055>void</font> addListener(Listener listener);
-
+
<font color=#3F5FBF>/**
* Remove a listener for locator service events.
*/</font>
<font color=#7F0055>void</font> removeListener(Listener listener);
-
+
<font color=#7F0055>interface</font> Listener {
<font color=#7F0055>void</font> peerAdded(IPeer peer);
-
+
<font color=#7F0055>void</font> peerRemoved(IPeer peer);
-
+
<font color=#7F0055>void</font> peerChanged(IPeer peer);
}
}
@@ -1518,4 +1518,4 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
</body>
</html>
-
+
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
index 3ab60cddb..e8e753675 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
+++ b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
index cefa9b92e..37e37d6d1 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
+++ b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
}
/**
- * Return service name, as it appears on the wire - a TCF name of the service.
+ * Return service name, as it appears on the wire - a TCF name of the service.
*/
public String getName() {
return NAME;
@@ -36,7 +36,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
* The method translates arguments to JSON string and sends the command message
* to remote server. When response arrives, it is translated from JSON to
* Java object, which are used to call call-back object.
- *
+ *
* The translation (marshaling) is done by using utility class Command.
*/
public IToken getTimeOfDay(String tz, final DoneGetTimeOfDay done) {
@@ -60,7 +60,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
* the proxy object every time a TCF communication channel is opened.
* Note: extension point "org.eclipse.tm.tcf.startup" is used to load this class
* at TCF startup time, so proxy factory is properly activated even if nobody
- * import directly from this plugin.
+ * import directly from this plugin.
*/
Protocol.addChannelOpenListener(new Protocol.ChannelOpenListener() {
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
index bebd22647..ef08ff838 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
+++ b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,13 +33,13 @@ public interface IDaytimeService extends IService {
* @param tz - time zone name.
* @param done - a call-back object.
* @return a handle for the pending command. The handle can be used to cancel the command,
- * and to match responses to requests - if same call-back object is used for
- * multiple requests.
+ * and to match responses to requests - if same call-back object is used for
+ * multiple requests.
*/
IToken getTimeOfDay(String tz, DoneGetTimeOfDay done);
/**
- * Call-back interface for getTimeOfDay() command.
+ * Call-back interface for getTimeOfDay() command.
*/
interface DoneGetTimeOfDay {
/**
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
index d612afb9e..c389eed7b 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
index 98ac112a6..ef653e97f 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -87,7 +87,7 @@ public class TCFLaunchContext implements ITCFLaunchContext {
* settings, or <code>null</code> if none. Note, if possible we will
* return the IBinary based on configuration entry as this may be more useful then
* just the project.
- *
+ *
* @return C element context.
*/
private ICElement getContext(ILaunchConfiguration config) {
@@ -208,7 +208,7 @@ public class TCFLaunchContext implements ITCFLaunchContext {
}
name = dlg.generateName(name);
config.rename(name);
- renamed = true;
+ renamed = true;
}
}
diff --git a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java b/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
index 11fa1e12e..eae8edaf2 100644
--- a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.util.tracker.ServiceTracker;
public class Activator implements BundleActivator {
-
+
private static final String TCF_INTEGRATION_BUNDLE_ID = "org.eclipse.tm.tcf";
public void start(BundleContext context) throws Exception {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
index b27eba05b..1d79cd6ad 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
index 11a29fed3..c6fc79f44 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import java.util.Map;
import org.eclipse.tm.tcf.core.AbstractPeer;
public class LocalPeer extends AbstractPeer {
-
+
private static Map<String,String> createAttributes() {
Map<String, String> attrs = new HashMap<String, String>();
attrs.put(ATTR_ID, "TCFLocal");
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
index 5facfa264..ce6a9f4fa 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,20 +15,20 @@ import java.util.Map;
import org.eclipse.tm.tcf.core.AbstractPeer;
public class RemotePeer extends AbstractPeer {
-
+
private long last_update_time;
-
+
public RemotePeer(Map<String,String> attrs) {
super(attrs);
last_update_time = System.currentTimeMillis();
}
-
+
@Override
public void updateAttributes(Map<String,String> attrs) {
super.updateAttributes(attrs);
last_update_time = System.currentTimeMillis();
}
-
+
public long getLastUpdateTime() {
return last_update_time;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
index 360dac927..2f4155a09 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Anyware Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Anyware Technologies - initial API and implementation
*******************************************************************************/
@@ -27,9 +27,9 @@ public class ServiceManager {
static {
addServiceProvider(new IServiceProvider() {
-
+
private final String package_name = LocatorProxy.class.getPackage().getName();
-
+
public IService[] getLocalService(IChannel channel) {
return new IService[]{ new DiagnosticsService(channel) };
}
@@ -56,7 +56,7 @@ public class ServiceManager {
public static void removeServiceProvider(IServiceProvider provider) {
providers.remove(provider);
}
-
+
public static void onChannelCreated(IChannel channel, Map<String,IService> services) {
IService zero_copy = new IService() {
public String getName() {
@@ -73,7 +73,7 @@ public class ServiceManager {
}
}
}
-
+
public static void onChannelOpened(IChannel channel, Collection<String> service_names, Map<String,IService> services) {
for (String name : service_names) {
for (IServiceProvider provider : providers) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
index 2e2f4c101..f247a67fd 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -67,7 +67,7 @@ public class Token implements IToken {
public IChannel.ICommandListener getListener() {
return listener;
}
-
+
@Override
public String toString() {
return id;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
index 6844fa572..a652cff51 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007-2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -35,11 +35,11 @@ public class TransportManager {
private static final Collection<AbstractChannel> channels =
new LinkedList<AbstractChannel>();
- private static final Collection<Protocol.ChannelOpenListener> listeners =
+ private static final Collection<Protocol.ChannelOpenListener> listeners =
new LinkedList<Protocol.ChannelOpenListener>();
private static final HashMap<String,ITransportProvider> transports =
new HashMap<String,ITransportProvider>();
-
+
static {
addTransportProvider(new ITransportProvider() {
@@ -57,7 +57,7 @@ public class TransportManager {
return new ChannelTCP(peer, host, Integer.parseInt(port), false);
}
});
-
+
addTransportProvider(new ITransportProvider() {
public String getName() {
@@ -74,7 +74,7 @@ public class TransportManager {
return new ChannelTCP(peer, host, Integer.parseInt(port), true);
}
});
-
+
addTransportProvider(new ITransportProvider() {
public String getName() {
@@ -87,20 +87,20 @@ public class TransportManager {
}
});
}
-
+
public static void addTransportProvider(ITransportProvider transport) {
String name = transport.getName();
assert name != null;
if (transports.get(name) != null) throw new Error("Already registered: " + name);
transports.put(name, transport);
}
-
+
public static void removeTransportProvider(ITransportProvider transport) {
String name = transport.getName();
assert name != null;
if (transports.get(name) == transport) transports.remove(name);
}
-
+
public static IChannel openChannel(IPeer peer) {
String name = peer.getTransportName();
if (name == null) throw new Error("No transport name");
@@ -127,11 +127,11 @@ public class TransportManager {
assert channels.contains(channel);
channels.remove(channel);
}
-
+
public static IChannel[] getOpenChannels() {
return channels.toArray(new IChannel[channels.size()]);
}
-
+
public static void addChanelOpenListener(Protocol.ChannelOpenListener listener) {
assert listener != null;
listeners.add(listener);
@@ -155,7 +155,7 @@ public class TransportManager {
/**
* Transmit TCF event message.
* The message is sent to all open communication channels – broadcasted.
- *
+ *
* This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
*/
public static void sendEvent(String service_name, String event_name, byte[] data) {
@@ -165,18 +165,18 @@ public class TransportManager {
if (s != null) channel.sendEvent(s, event_name, data);
}
}
-
+
/**
* Call back after TCF messages sent by this host up to this moment are delivered
* to their intended targets. This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need cross channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need cross channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
- *
+ *
* This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
*/
public static void sync(final Runnable done) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
index f3530cd38..9a760cef2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,13 +28,13 @@ class ChannelProxy {
private final AbstractChannel ch_x;
private final AbstractChannel ch_y;
-
+
private boolean closed_x;
private boolean closed_y;
-
+
private final Map<IToken,IToken> tokens_x = new HashMap<IToken,IToken>();
private final Map<IToken,IToken> tokens_y = new HashMap<IToken,IToken>();
-
+
private final AbstractChannel.Proxy proxy_x = new AbstractChannel.Proxy() {
public void onChannelClosed(Throwable error) {
@@ -51,14 +51,14 @@ class ChannelProxy {
if (s == null) ch_x.terminate(new IOException("Invalid service name"));
else tokens_x.put(ch_y.sendCommand(s, name, data, cmd_listener_x), token);
}
-
+
public void onEvent(String service, String name, byte[] data) {
IService s = ch_x.getRemoteService(service);
if (s == null) ch_x.terminate(new IOException("Invalid service name"));
else if (!closed_y) ch_y.sendEvent(s, name, data);
}
};
-
+
private final AbstractChannel.Proxy proxy_y = new AbstractChannel.Proxy() {
public void onChannelClosed(Throwable error) {
@@ -75,14 +75,14 @@ class ChannelProxy {
if (s == null) ch_y.terminate(new IOException("Invalid service name"));
else tokens_y.put(ch_x.sendCommand(s, name, data, cmd_listener_y), token);
}
-
+
public void onEvent(String service, String name, byte[] data) {
IService s = ch_y.getRemoteService(service);
if (s == null) ch_y.terminate(new IOException("Invalid service name"));
else if (!closed_x) ch_x.sendEvent(s, name, data);
}
};
-
+
private final IChannel.ICommandListener cmd_listener_x = new IChannel.ICommandListener() {
public void progress(IToken token, byte[] data) {
@@ -98,7 +98,7 @@ class ChannelProxy {
tokens_x.remove(token);
}
};
-
+
private final IChannel.ICommandListener cmd_listener_y = new IChannel.ICommandListener() {
public void progress(IToken token, byte[] data) {
@@ -114,7 +114,7 @@ class ChannelProxy {
tokens_y.remove(token);
}
};
-
+
ChannelProxy(IChannel x, IChannel y) {
assert !(x instanceof ChannelLoop);
assert !(y instanceof ChannelLoop);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
index 76f4dcc94..9637519c1 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,9 +23,9 @@ import org.eclipse.tm.tcf.services.IDiagnostics;
public class DiagnosticsService implements IDiagnostics {
private final IChannel channel;
-
+
private class CommandServer implements IChannel.ICommandServer {
-
+
public void command(IToken token, String name, byte[] data) {
try {
command(token, name, JSON.parseSequence(data));
@@ -34,7 +34,7 @@ public class DiagnosticsService implements IDiagnostics {
channel.terminate(x);
}
}
-
+
private void command(IToken token, String name, Object[] args) throws Exception {
if (name.equals("echo")) {
if (args.length != 1) throw new Exception("Invalid number of arguments");
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
index 77b27ac0c..952731ffb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -50,7 +50,7 @@ import org.eclipse.tm.tcf.services.ILocator;
*/
// TODO: research usage of DNS-SD (DNS Service Discovery) to discover TCF peers
public class LocatorService implements ILocator {
-
+
private static final int DISCOVEY_PORT = 1534;
private static final int MAX_PACKET_SIZE = 9000 - 40 - 8;
private static final int PREF_PACKET_SIZE = 1500 - 40 - 8;
@@ -58,28 +58,28 @@ public class LocatorService implements ILocator {
private static LocatorService locator;
private static final Map<String,IPeer> peers = new HashMap<String,IPeer>();
private static final ArrayList<LocatorListener> listeners = new ArrayList<LocatorListener>();
-
+
private final HashSet<SubNet> subnets = new HashSet<SubNet>();
private final ArrayList<Slave> slaves = new ArrayList<Slave>();
private final byte[] inp_buf = new byte[MAX_PACKET_SIZE];
private final byte[] out_buf = new byte[MAX_PACKET_SIZE];
-
+
private InetAddress loopback_addr;
-
+
private static class SubNet {
final int prefix_length;
final InetAddress address;
final InetAddress broadcast;
-
+
long last_slaves_req_time;
boolean send_all_ok;
-
+
SubNet(int prefix_length, InetAddress address, InetAddress broadcast) {
this.prefix_length = prefix_length;
this.address = address;
this.broadcast = broadcast;
}
-
+
boolean contains(InetAddress addr) {
if (addr == null) return false;
byte[] a1 = addr.getAddress();
@@ -98,7 +98,7 @@ public class LocatorService implements ILocator {
}
return true;
}
-
+
@Override
public boolean equals(Object o) {
if (!(o instanceof SubNet)) return false;
@@ -108,44 +108,44 @@ public class LocatorService implements ILocator {
broadcast.equals(x.broadcast) &&
address.equals(x.address);
}
-
+
@Override
public int hashCode() {
return broadcast.hashCode();
}
-
+
@Override
public String toString() {
return broadcast.getHostAddress() + "/" + prefix_length;
}
}
-
+
private static class Slave {
final InetAddress address;
final int port;
-
+
/* Time of last packet receiver from this slave */
- long last_packet_time;
-
+ long last_packet_time;
+
/* Time of last REQ_SLAVES packet received from this slave */
long last_req_slaves_time;
-
+
Slave(InetAddress address, int port) {
this.address = address;
this.port = port;
}
-
+
@Override
public String toString() {
return address.getHostAddress() + ":" + port;
}
}
-
+
private static LocalPeer local_peer;
-
+
private DatagramSocket socket;
private long last_master_packet_time;
-
+
private Thread timer_thread = new Thread() {
public void run() {
while (true) {
@@ -167,7 +167,7 @@ public class LocatorService implements ILocator {
}
}
};
-
+
private Thread input_thread = new Thread() {
public void run() {
for (;;) {
@@ -192,10 +192,10 @@ public class LocatorService implements ILocator {
}
}
};
-
+
static {
ServiceManager.addServiceProvider(new IServiceProvider() {
-
+
public IService[] getLocalService(final IChannel channel) {
channel.addCommandServer(locator, new IChannel.ICommandServer() {
public void command(IToken token, String name, byte[] data) {
@@ -210,7 +210,7 @@ public class LocatorService implements ILocator {
}
});
}
-
+
public LocatorService() {
locator = this;
try {
@@ -264,7 +264,7 @@ public class LocatorService implements ILocator {
public static LocalPeer getLocalPeer() {
return local_peer;
}
-
+
public static LocatorListener[] getListeners() {
return listeners.toArray(new LocatorListener[listeners.size()]);
}
@@ -315,7 +315,7 @@ public class LocatorService implements ILocator {
else if (name.equals("getPeers")) {
int i = 0;
Object[] arr = new Object[peers.size()];
- for (IPeer p : peers.values()) arr[i++] = p.getAttributes();
+ for (IPeer p : peers.values()) arr[i++] = p.getAttributes();
channel.sendResult(token, JSON.toJSONSequence(new Object[]{ null, arr }));
}
else {
@@ -326,7 +326,7 @@ public class LocatorService implements ILocator {
channel.terminate(x);
}
}
-
+
private void refresh_timer() {
long time = System.currentTimeMillis();
/* Cleanup slave table */
@@ -377,7 +377,7 @@ public class LocatorService implements ILocator {
refreshSubNetList();
sendAll(null, 0, null, time);
}
-
+
private Slave addSlave(InetAddress addr, int port, long timestamp) {
for (Slave s : slaves) {
if (s.port == port && s.address.equals(addr)) {
@@ -394,9 +394,9 @@ public class LocatorService implements ILocator {
sendSlaveInfo(s, time);
return s;
}
-
+
private void refreshSubNetList() {
- HashSet<SubNet> set = new HashSet<SubNet>();
+ HashSet<SubNet> set = new HashSet<SubNet>();
try {
for (Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); e.hasMoreElements();) {
NetworkInterface f = e.nextElement();
@@ -418,7 +418,7 @@ public class LocatorService implements ILocator {
}
catch (Exception x) {
// Java 1.5 or older
- // TODO: need a better way to get broadcast addresses on Java 1.5 VM
+ // TODO: need a better way to get broadcast addresses on Java 1.5 VM
Enumeration<InetAddress> n = f.getInetAddresses();
while (n.hasMoreElements()) {
InetAddress addr = n.nextElement();
@@ -448,7 +448,7 @@ public class LocatorService implements ILocator {
subnets.add(s);
}
}
-
+
private void sendPeersRequest(InetAddress addr, int port) {
out_buf[4] = CONF_REQ_INFO;
for (SubNet n : subnets) {
@@ -469,7 +469,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private void sendPeerInfo(IPeer peer, InetAddress addr, int port) {
Map<String,String> attrs = peer.getAttributes();
if (attrs.get(IPeer.ATTR_IP_HOST) == null) return;
@@ -480,12 +480,12 @@ public class LocatorService implements ILocator {
for (String key : attrs.keySet()) {
String s = key + "=" + attrs.get(key);
byte[] bt = s.getBytes("UTF-8");
- if (i + bt.length >= out_buf.length) break;
+ if (i + bt.length >= out_buf.length) break;
System.arraycopy(bt, 0, out_buf, i, bt.length);
i += bt.length;
out_buf[i++] = 0;
}
-
+
InetAddress peer_addr = InetAddress.getByName(attrs.get(IPeer.ATTR_IP_HOST));
for (SubNet subnet : subnets) {
if (peer instanceof RemotePeer) {
@@ -513,7 +513,7 @@ public class LocatorService implements ILocator {
Protocol.log("Cannot send datagram packet", x);
}
}
-
+
private void sendEmptyPacket(InetAddress addr, int port) {
out_buf[4] = CONF_SLAVES_INFO;
for (SubNet n : subnets) {
@@ -535,7 +535,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private void sendAll(InetAddress addr, int port, Slave sl, long time) {
for (SubNet n : subnets) n.send_all_ok = false;
for (IPeer peer : peers.values()) sendPeerInfo(peer, addr, port);
@@ -544,7 +544,7 @@ public class LocatorService implements ILocator {
}
sendEmptyPacket(addr, port);
}
-
+
private void sendSlavesRequest(InetAddress addr, int port) {
try {
out_buf[4] = CONF_REQ_SLAVES;
@@ -554,7 +554,7 @@ public class LocatorService implements ILocator {
Protocol.log("Cannot send datagram packet", x);
}
}
-
+
private void sendSlaveInfo(Slave x, long time) {
out_buf[4] = CONF_SLAVES_INFO;
for (SubNet n : subnets) {
@@ -577,7 +577,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private void sendSlavesInfo(InetAddress addr, int port, long time) {
out_buf[4] = CONF_SLAVES_INFO;
for (SubNet n : subnets) {
@@ -608,7 +608,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private boolean isRemote(InetAddress address, int port) {
if (port != socket.getLocalPort()) return true;
for (SubNet s : subnets) {
@@ -616,7 +616,7 @@ public class LocatorService implements ILocator {
}
return true;
}
-
+
private void handleDatagramPacket(DatagramPacket p) {
try {
long time = System.currentTimeMillis();
@@ -628,7 +628,7 @@ public class LocatorService implements ILocator {
if (buf[2] != 'F') return;
if (buf[3] != CONF_VERSION) return;
int remote_port = p.getPort();
- InetAddress remote_address = p.getAddress();
+ InetAddress remote_address = p.getAddress();
if (isRemote(remote_address, remote_port)) {
Slave sl = null;
if (p.getPort() != DISCOVEY_PORT) {
@@ -667,7 +667,7 @@ public class LocatorService implements ILocator {
Protocol.log("Invalid datagram packet received", x);
}
}
-
+
private void handlePeerInfoPacket(DatagramPacket p) {
try {
Map<String,String> map = new HashMap<String,String>();
@@ -743,12 +743,12 @@ public class LocatorService implements ILocator {
Protocol.log("Invalid datagram packet received", x);
}
}
-
+
private void handleReqSlavesPacket(DatagramPacket p, Slave sl, long time) {
if (sl != null) sl.last_req_slaves_time = time;
sendSlavesInfo(p.getAddress(), p.getPort(), time);
}
-
+
/*----------------------------------------------------------------------------------*/
public static LocatorService getLocator() {
@@ -758,7 +758,7 @@ public class LocatorService implements ILocator {
public String getName() {
return NAME;
}
-
+
public Map<String,IPeer> getPeers() {
assert Protocol.isDispatchThread();
return peers;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
index 683055ea7..65c11a80a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
index e3a5dd8cb..8faa2f104 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,13 +21,13 @@ import org.eclipse.tm.tcf.services.IDiagnostics;
public class DiagnosticsProxy implements IDiagnostics {
-
+
private final IChannel channel;
-
+
private static class Symbol implements ISymbol {
-
+
private final Map<String,Object> props;
-
+
Symbol(Map<String,Object> props) {
this.props = props;
}
@@ -65,7 +65,7 @@ public class DiagnosticsProxy implements IDiagnostics {
return s != null && s.equals("UNDEF");
}
}
-
+
public DiagnosticsProxy(IChannel channel) {
this.channel = channel;
}
@@ -211,7 +211,7 @@ public class DiagnosticsProxy implements IDiagnostics {
Collection<String> c = (Collection<String>)o;
return (String[])c.toArray(new String[c.size()]);
}
-
+
@SuppressWarnings("unchecked")
private ISymbol toSymbol(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
index 02fb12acf..1d5c1e0c4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -27,11 +27,11 @@ public class ExpressionsProxy implements IExpressions {
private final IChannel channel;
private final Map<ExpressionsListener,IChannel.IEventListener> listeners =
new HashMap<ExpressionsListener,IChannel.IEventListener>();
-
+
private class Context implements Expression {
-
+
private final Map<String,Object> props;
-
+
Context(Map<String,Object> props) {
this.props = props;
}
@@ -78,18 +78,18 @@ public class ExpressionsProxy implements IExpressions {
return (String)props.get(PROP_TYPE);
}
}
-
+
private class ContextValue implements Value {
private final byte[] value;
private final Map<String,Object> props;
-
+
ContextValue(byte[] value, Map<String,Object> props) {
if (props == null) props = new HashMap<String,Object>();
this.value = value;
this.props = props;
}
-
+
public Map<String, Object> getProperties() {
return props;
}
@@ -129,7 +129,7 @@ public class ExpressionsProxy implements IExpressions {
return n.booleanValue();
}
}
-
+
public ExpressionsProxy(IChannel channel) {
this.channel = channel;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
index 13e6bbcf7..58fa9a7f3 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,10 +23,10 @@ import org.eclipse.tm.tcf.services.IFileSystem;
public class FileSystemProxy implements IFileSystem {
-
+
private final class FileHandle implements IFileHandle {
final String id;
-
+
FileHandle(String id) {
this.id = id;
}
@@ -34,31 +34,31 @@ public class FileSystemProxy implements IFileSystem {
public IFileSystem getService() {
return FileSystemProxy.this;
}
-
+
public String toString() {
return "[File Handle '" + id + "']";
}
}
-
+
private static final class Status extends FileSystemException implements IErrorReport {
-
+
private static final long serialVersionUID = -1636567076145085980L;
-
+
private final int status;
private final Map<String,Object> attrs;
-
+
Status(int status, String message, Map<String,Object> attrs) {
super(message);
this.status = status;
this.attrs = attrs;
}
-
+
Status(Exception x) {
super(x);
this.status = IErrorReport.TCF_ERROR_OTHER;
this.attrs = new HashMap<String,Object>();
}
-
+
public int getStatus() {
return status;
}
@@ -83,13 +83,13 @@ public class FileSystemProxy implements IFileSystem {
return attrs;
}
}
-
+
private abstract class FileSystemCommand extends Command {
-
+
FileSystemCommand(String command, Object[] args) {
super(channel, FileSystemProxy.this, command, args);
}
-
+
@SuppressWarnings("unchecked")
public Status toFSError(Object data) {
if (data == null) return null;
@@ -107,9 +107,9 @@ public class FileSystemProxy implements IFileSystem {
return s;
}
}
-
+
private final IChannel channel;
-
+
public FileSystemProxy(IChannel channel) {
this.channel = channel;
}
@@ -513,7 +513,7 @@ public class FileSystemProxy implements IFileSystem {
public String getName() {
return NAME;
}
-
+
private Object toObject(FileAttrs attrs) {
if (attrs == null) return null;
Map<String,Object> m = new HashMap<String,Object>();
@@ -534,7 +534,7 @@ public class FileSystemProxy implements IFileSystem {
}
return m;
}
-
+
@SuppressWarnings("unchecked")
private FileAttrs toFileAttrs(Object o) {
if (o == null) return null;
@@ -572,12 +572,12 @@ public class FileSystemProxy implements IFileSystem {
}
return new FileAttrs(flags, size, uid, gid, permissions, atime, mtime, m);
}
-
+
private FileHandle toFileHandle(Object o) {
if (o == null) return null;
return new FileHandle(o.toString());
}
-
+
@SuppressWarnings("unchecked")
private DirEntry[] toDirEntryArray(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
index 99df14426..af27505d7 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,11 +28,11 @@ public class GenericProxy implements IService {
this.channel = channel;
this.name = name;
}
-
+
public String getName() {
return name;
}
-
+
public IChannel getChannel() {
return channel;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
index 3263e2dbe..cea1177a2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
@@ -10,7 +10,7 @@ import org.eclipse.tm.tcf.services.ILineNumbers;
public class LineNumbersProxy implements ILineNumbers {
-
+
private final IChannel channel;
public LineNumbersProxy(IChannel channel) {
@@ -37,25 +37,25 @@ public class LineNumbersProxy implements ILineNumbers {
}
}.token;
}
-
+
private static int getInteger(Map<String,Object> map, String name, int def) {
Number n = (Number)map.get(name);
if (n == null) return def;
return n.intValue();
}
-
+
private static String getString(Map<String,Object> map, String name, String def) {
String s = (String)map.get(name);
if (s == null) return def;
return s;
}
-
+
private static boolean getBoolean(Map<String,Object> map, String name) {
Boolean b = (Boolean)map.get(name);
if (b == null) return false;
return b.booleanValue();
}
-
+
@SuppressWarnings("unchecked")
private CodeArea[] toTextAreaArray(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
index 8c72d8960..cacbaefc0 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,19 +26,19 @@ import org.eclipse.tm.tcf.services.ILocator;
public class LocatorProxy implements ILocator {
-
+
private final IChannel channel;
private final Map<String,IPeer> peers = new HashMap<String,IPeer>();
private final Collection<LocatorListener> listeners = new ArrayList<LocatorListener>();
-
+
private boolean get_peers_done = false;
-
+
private class Peer implements IPeer {
-
+
private final IPeer parent;
-
+
private final Map<String, String> attrs;
-
+
Peer(IPeer parent, Map<String,String> attrs) {
this.parent = parent;
this.attrs = attrs;
@@ -153,7 +153,7 @@ public class LocatorProxy implements ILocator {
}
}
};
-
+
public LocatorProxy(IChannel channel) {
this.channel = channel;
channel.addEventListener(this, event_listener);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
index e8dd8b948..02215e433 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -31,26 +31,26 @@ public class MemoryProxy implements IMemory {
private final IChannel channel;
private final Map<MemoryListener,IChannel.IEventListener> listeners =
new HashMap<MemoryListener,IChannel.IEventListener>();
-
+
private static class Range implements Comparable<Range> {
int offs;
int size;
int stat;
String msg;
-
+
public int compareTo(Range o) {
if (offs < o.offs) return -1;
if (offs > o.offs) return +1;
return 0;
}
}
-
+
private class MemoryErrorReport extends MemoryError implements ErrorOffset, IErrorReport {
-
+
private static final long serialVersionUID = 796525409870265390L;
private final Map<String,Object> attrs;
private final Range[] ranges;
-
+
@SuppressWarnings("unchecked")
MemoryErrorReport(String msg, Map<String,Object> attrs, Number addr, Object ranges) {
super(msg);
@@ -250,7 +250,7 @@ public class MemoryProxy implements IMemory {
}
}.token;
}
-
+
public String toString() {
return "[Memory Context " + props.toString() + "]";
}
@@ -316,7 +316,7 @@ public class MemoryProxy implements IMemory {
}
}.token;
}
-
+
public IToken getChildren(String parent_context_id, final DoneGetChildren done) {
return new Command(channel, this, "getChildren", new Object[]{ parent_context_id }) {
@Override
@@ -335,9 +335,9 @@ public class MemoryProxy implements IMemory {
public String getName() {
return NAME;
}
-
+
private abstract class MemoryCommand extends Command {
-
+
MemoryCommand(String cmd, Object[] args) {
super(channel, MemoryProxy.this, cmd, args);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
index b75c48c71..b71efef71 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,15 +23,15 @@ import org.eclipse.tm.tcf.services.IProcesses;
public class ProcessesProxy implements IProcesses {
-
+
private final IChannel channel;
private final Map<ProcessesListener,IChannel.IEventListener> listeners =
new HashMap<ProcessesListener,IChannel.IEventListener>();
-
+
private class ProcessContext implements IProcesses.ProcessContext {
private final Map<String,Object> props;
-
+
ProcessContext(Map<String,Object> props) {
this.props = props;
}
@@ -108,7 +108,7 @@ public class ProcessesProxy implements IProcesses {
return "[Processes Context " + props.toString() + "]";
}
}
-
+
public ProcessesProxy(IChannel channel) {
this.channel = channel;
}
@@ -293,7 +293,7 @@ public class ProcessesProxy implements IProcesses {
}
return arr;
}
-
+
@SuppressWarnings("unchecked")
private static Map<String,String> toEnvMap(Object o) {
Map<String,String> m = new HashMap<String,String>();
@@ -306,7 +306,7 @@ public class ProcessesProxy implements IProcesses {
}
return m;
}
-
+
@SuppressWarnings("unchecked")
private static Collection<Map<String,Object>> toSignalList(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
index 947852ccb..031de981d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -27,11 +27,11 @@ public class RegistersProxy implements IRegisters {
private final IChannel channel;
private final Map<RegistersListener,IChannel.IEventListener> listeners =
new HashMap<RegistersListener,IChannel.IEventListener>();
-
+
private class Context implements RegistersContext {
-
+
private final Map<String,Object> props;
-
+
Context(Map<String,Object> props) {
this.props = props;
}
@@ -65,7 +65,7 @@ public class RegistersProxy implements IRegisters {
public String getParentID() {
return (String)props.get(PROP_PARENT_ID);
}
-
+
public int getSize() {
Number n = (Number)props.get(PROP_SIZE);
if (n == null) return 0;
@@ -197,16 +197,16 @@ public class RegistersProxy implements IRegisters {
}
}.token;
}
-
+
public String toString() {
return "[Registers Context " + props.toString() + "]";
}
}
-
+
public RegistersProxy(IChannel channel) {
this.channel = channel;
}
-
+
public String getName() {
return NAME;
}
@@ -270,7 +270,7 @@ public class RegistersProxy implements IRegisters {
}
}.token;
}
-
+
public void addListener(final RegistersListener listener) {
IChannel.IEventListener l = new IChannel.IEventListener() {
@@ -308,7 +308,7 @@ public class RegistersProxy implements IRegisters {
Collection<String> c = (Collection<String>)o;
return (String[])c.toArray(new String[c.size()]);
}
-
+
@SuppressWarnings("unchecked")
private int[] toIntArray(Object o) {
if (o == null) return null;
@@ -318,7 +318,7 @@ public class RegistersProxy implements IRegisters {
for (Number n : c) arr[i++] = n.intValue();
return arr;
}
-
+
@SuppressWarnings("unchecked")
private String[][] toPathArray(Object o) {
if (o == null) return null;
@@ -330,13 +330,13 @@ public class RegistersProxy implements IRegisters {
}
return r;
}
-
+
private static class NamedValueInfo implements NamedValue {
-
+
private final String desc;
private final String name;
private final byte[] value;
-
+
NamedValueInfo(Map<String,Object> m) {
desc = (String)m.get("Description");
name = (String)m.get("Name");
@@ -355,7 +355,7 @@ public class RegistersProxy implements IRegisters {
return value;
}
}
-
+
@SuppressWarnings("unchecked")
private NamedValue[] toValuesArray(Object o) {
Collection<Map<String,Object>> c = (Collection<Map<String,Object>>)o;
@@ -367,7 +367,7 @@ public class RegistersProxy implements IRegisters {
}
return arr;
}
-
+
static {
JSON.addObjectWriter(Location.class, new JSON.ObjectWriter() {
public void write(Object o) throws IOException {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
index 67570fd7e..c1147e5a3 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -135,7 +135,7 @@ public class RunControlProxy implements IRunControl {
}
}.token;
}
-
+
public String toString() {
return "[Run Control Context " + props.toString() + "]";
}
@@ -207,7 +207,7 @@ public class RunControlProxy implements IRunControl {
channel.addEventListener(this, l);
listeners.put(listener, l);
}
-
+
public void removeListener(RunControlListener listener) {
IChannel.IEventListener l = listeners.remove(listener);
if (l != null) channel.removeEventListener(this, l);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
index 59b57c014..a11d2ba3e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
index 50d8e7771..861186638 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
index 6f21f5536..728321da4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
@@ -12,12 +12,12 @@ import org.eclipse.tm.tcf.services.ISymbols;
public class SymbolsProxy implements ISymbols {
private final IChannel channel;
-
+
private class Context implements Symbol {
-
+
private final byte[] value;
private final Map<String,Object> props;
-
+
Context(Map<String,Object> props) {
this.props = props;
value = JSON.toByteArray(props.get(PROP_VALUE));
@@ -111,7 +111,7 @@ public class SymbolsProxy implements ISymbols {
public SymbolsProxy(IChannel channel) {
this.channel = channel;
}
-
+
public String getName() {
return NAME;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
index 75a17d5d5..2ff8edd95 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -116,7 +116,7 @@ public class SysMonitorProxy implements ISysMonitor {
public Map<String, Object> getProperties() {
return props;
}
-
+
public String toString() {
return "[Sys Monitor Context " + props.toString() + "]";
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
index a346339fc..15b679330 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,30 +33,30 @@ import org.eclipse.tm.tcf.services.ILocator;
/**
* Abstract implementation of IChannel interface.
- *
+ *
* AbstractChannel implements communication link connecting two end points (peers).
* The channel asynchronously transmits messages: commands, results and events.
- *
+ *
* Clients can subclass AbstractChannel to support particular transport (wire) protocol.
* Also, see StreamChannel for stream oriented transport protocols.
*/
public abstract class AbstractChannel implements IChannel {
public interface TraceListener {
-
+
public void onMessageReceived(char type, String token,
String service, String name, byte[] data);
-
+
public void onMessageSent(char type, String token,
String service, String name, byte[] data);
-
+
public void onChannelClosed(Throwable error);
}
-
+
public interface Proxy {
-
+
public void onCommand(IToken token, String service, String name, byte[] data);
-
+
public void onEvent(String service, String name, byte[] data);
public void onChannelClosed(Throwable error);
@@ -73,7 +73,7 @@ public abstract class AbstractChannel implements IChannel {
boolean is_canceled;
Collection<TraceListener> trace;
-
+
Message(char type) {
this.type = type;
}
@@ -146,11 +146,11 @@ public abstract class AbstractChannel implements IChannel {
private long local_congestion_time;
private int local_congestion_cnt;
private Collection<TraceListener> trace_listeners;
-
+
public static final int
EOS = -1, // End Of Stream
EOM = -2; // End Of Message
-
+
protected AbstractChannel(IPeer remote_peer) {
this(LocatorService.getLocalPeer(), remote_peer);
}
@@ -372,7 +372,7 @@ public abstract class AbstractChannel implements IChannel {
if (state == STATE_CLOSED) return;
ServiceManager.onChannelCreated(AbstractChannel.this, local_service_by_name);
makeServiceByClassMap(local_service_by_name, local_service_by_class);
- Object[] args = new Object[]{ local_service_by_name.keySet() };
+ Object[] args = new Object[]{ local_service_by_name.keySet() };
sendEvent(Protocol.getLocator(), "Hello", JSON.toJSONSequence(args));
}
catch (IOException x) {
@@ -475,7 +475,7 @@ public abstract class AbstractChannel implements IChannel {
assert Protocol.isDispatchThread();
channel_listeners.remove(listener);
}
-
+
public void addTraceListener(TraceListener listener) {
if (trace_listeners == null) {
trace_listeners = new ArrayList<TraceListener>();
@@ -485,7 +485,7 @@ public abstract class AbstractChannel implements IChannel {
}
trace_listeners.add(listener);
}
-
+
public void removeTraceListener(TraceListener listener) {
trace_listeners = new ArrayList<TraceListener>(trace_listeners);
trace_listeners.remove(listener);
@@ -543,7 +543,7 @@ public abstract class AbstractChannel implements IChannel {
out_queue.notify();
}
}
-
+
public void close() {
assert Protocol.isDispatchThread();
try {
@@ -645,7 +645,7 @@ public abstract class AbstractChannel implements IChannel {
assert Protocol.isDispatchThread();
return remote_peer;
}
-
+
public Collection<String> getLocalServices() {
assert Protocol.isDispatchThread();
assert state != STATE_OPENNING;
@@ -657,7 +657,7 @@ public abstract class AbstractChannel implements IChannel {
assert state != STATE_OPENNING;
return remote_service_by_name.keySet();
}
-
+
@SuppressWarnings("unchecked")
public <V extends IService> V getLocalService(Class<V> cls) {
assert Protocol.isDispatchThread();
@@ -671,15 +671,15 @@ public abstract class AbstractChannel implements IChannel {
assert state != STATE_OPENNING;
return (V)remote_service_by_class.get(cls);
}
-
+
public <V extends IService> void setServiceProxy(Class<V> service_interface, IService service_proxy) {
if (!notifying_channel_opened) new Error("setServiceProxe() can be called only from channel open call-back");
- if (!(remote_service_by_name.get(service_proxy.getName()) instanceof GenericProxy)) throw new Error("Proxy already set");
+ if (!(remote_service_by_name.get(service_proxy.getName()) instanceof GenericProxy)) throw new Error("Proxy already set");
if (remote_service_by_class.get(service_interface) != null) throw new Error("Proxy already set");
remote_service_by_class.put(service_interface, service_proxy);
remote_service_by_name.put(service_proxy.getName(), service_proxy);
}
-
+
public IService getLocalService(String service_name) {
assert Protocol.isDispatchThread();
assert state != STATE_OPENNING;
@@ -691,14 +691,14 @@ public abstract class AbstractChannel implements IChannel {
assert state != STATE_OPENNING;
return remote_service_by_name.get(service_name);
}
-
+
public void setProxy(Proxy proxy, Collection<String> services) throws IOException {
this.proxy = proxy;
sendEvent(Protocol.getLocator(), "Hello", JSON.toJSONSequence(new Object[]{ services }));
local_service_by_class.clear();
local_service_by_name.clear();
}
-
+
private void addToOutQueue(Message msg) {
msg.trace = trace_listeners;
synchronized (out_queue) {
@@ -771,11 +771,11 @@ public abstract class AbstractChannel implements IChannel {
msg.data = args;
addToOutQueue(msg);
}
-
+
public boolean isZeroCopySupported() {
return zero_copy;
}
-
+
@SuppressWarnings("unchecked")
private void handleInput(Message msg) {
assert Protocol.isDispatchThread();
@@ -848,7 +848,7 @@ public abstract class AbstractChannel implements IChannel {
proxy.onEvent(msg.service, msg.name, msg.data);
}
else if (hello) {
- assert state == STATE_OPENNING;
+ assert state == STATE_OPENNING;
state = STATE_OPEN;
assert redirect_command == null;
if (redirect_queue.size() > 0) {
@@ -938,7 +938,7 @@ public abstract class AbstractChannel implements IChannel {
* Write one byte into the channel output stream.
* The method argument can be one of two special values:
* EOS (-1) end of stream marker;
- * EOM (-2) end of message marker.
+ * EOM (-2) end of message marker.
* The stream can put the byte into a buffer instead of transmitting it right away.
* @param n - the data byte.
* @throws IOException
@@ -955,7 +955,7 @@ public abstract class AbstractChannel implements IChannel {
/**
* Stop (close) channel underlying streams.
* If a thread is blocked by read() or write(), it should be
- * resumed (or interrupted).
+ * resumed (or interrupted).
* @throws IOException
*/
protected abstract void stop() throws IOException;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
index ef79c1db6..94ab622ff 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -32,9 +32,9 @@ public class AbstractPeer implements IPeer {
private final Map<String, String> ro_attrs;
private final Map<String, String> rw_attrs;
-
+
private long last_heart_beat_time;
-
+
public AbstractPeer(Map<String,String> attrs) {
assert Protocol.isDispatchThread();
if (attrs != null) {
@@ -47,10 +47,10 @@ public class AbstractPeer implements IPeer {
assert getID() != null;
LocatorService.addPeer(this);
}
-
+
void onChannelTerminated() {
// A channel to this peer was terminated:
- // not delaying next heart beat helps client to recover much faster.
+ // not delaying next heart beat helps client to recover much faster.
last_heart_beat_time = 0;
}
@@ -111,7 +111,7 @@ public class AbstractPeer implements IPeer {
last_heart_beat_time = time;
}
}
-
+
public void sendPeerAddedEvent() {
for (LocatorListener l : LocatorService.getListeners()) {
try {
@@ -179,7 +179,7 @@ public class AbstractPeer implements IPeer {
assert Protocol.isDispatchThread();
return ro_attrs.get(ATTR_TRANSPORT_NAME);
}
-
+
public IChannel openChannel() {
return TransportManager.openChannel(this);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
index 2a8ea72fa..27a3824cd 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ package org.eclipse.tm.tcf.core;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class Base64 {
-
+
public static char[] toBase64(byte[] buf, int pos, int len) {
char[] out_buf = new char[4 * ((len + 2) / 3)];
int end = pos + len;
@@ -46,7 +46,7 @@ public final class Base64 {
assert out_pos == out_buf.length;
return out_buf;
}
-
+
public static void toByteArray(byte[] buf, int offs, int size, char[] inp) {
int out_pos = offs;
if (inp != null) {
@@ -109,7 +109,7 @@ public final class Base64 {
toByteArray(buf, 0, buf.length, inp);
return buf;
}
-
+
/*
* See RFC 2045.
*/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
index 20ac6cb87..0f552ab78 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
index 886a1a793..bc3f32e5a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,17 +30,17 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* This is utility class that helps to implement sending a command and receiving
* command result over TCF communication channel. The class uses JSON to encode
* command arguments and to decode result data.
- *
+ *
* The class also provides support for TCF standard error report encoding.
- *
+ *
* Clients are expected to subclass <code>Command</code> and override <code>done</code> method.
- *
+ *
* Note: most clients don't need to handle protocol commands directly and
* can use service APIs instead. Service API does all command encoding/decoding
* for a client.
- *
+ *
* Typical usage example:
- *
+ *
* public IToken getContext(String id, final DoneGetContext done) {
* return new Command(channel, IService.this, "getContext", new Object[]{ id }) {
* @Override
@@ -57,17 +57,17 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* }
*/
public abstract class Command implements IChannel.ICommandListener {
-
+
private final IService service;
private final String command;
private final Object[] args;
-
+
public final IToken token;
-
+
private boolean done;
-
+
private static final SimpleDateFormat timestamp_format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-
+
public Command(IChannel channel, IService service, String command, Object[] args) {
this.service = service;
this.command = command;
@@ -116,9 +116,9 @@ public abstract class Command implements IChannel.ICommandListener {
done = true;
done(error, null);
}
-
+
public abstract void done(Exception error, Object[] args);
-
+
public String getCommandString() {
StringBuffer buf = new StringBuffer();
buf.append(service.getName());
@@ -139,7 +139,7 @@ public abstract class Command implements IChannel.ICommandListener {
}
return buf.toString();
}
-
+
@SuppressWarnings({ "unchecked" })
public static String toErrorString(Object data) {
if (data == null) return null;
@@ -163,7 +163,7 @@ public abstract class Command implements IChannel.ICommandListener {
}
return "Invalid error report format";
}
-
+
static void appendErrorProps(StringBuffer bf, Map<String,Object> map) {
Number time = (Number)map.get(IErrorReport.ERROR_TIME);
Number code = (Number)map.get(IErrorReport.ERROR_CODE);
@@ -209,11 +209,11 @@ public abstract class Command implements IChannel.ICommandListener {
}
}
}
-
+
public Exception toError(Object data) {
return toError(data, true);
}
-
+
@SuppressWarnings("unchecked")
public Exception toError(Object data, boolean include_command_text) {
if (data == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
index 56dbca80e..59d3d3ffa 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007-2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,10 +16,10 @@ import java.util.Map;
import org.eclipse.tm.tcf.protocol.IErrorReport;
class ErrorReport extends Exception implements IErrorReport {
-
+
private static final long serialVersionUID = 3687543884858739977L;
private final Map<String,Object> attrs;
-
+
@SuppressWarnings("unchecked")
ErrorReport(String msg, Map<String,Object> attrs) {
super(msg);
@@ -34,7 +34,7 @@ class ErrorReport extends Exception implements IErrorReport {
initCause(new ErrorReport(bf.toString(), map));
}
}
-
+
ErrorReport(String msg, int code) {
super(msg);
attrs = new HashMap<String,Object>();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
index 70d14924b..35e1bc67d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,27 +28,27 @@ import org.eclipse.tm.tcf.protocol.Protocol;
/**
* ServerTCP is a TCP server that is listening for incoming connection requests
* and creates TCF communication channels over TCP sockets for such requests.
- *
+ *
* Clients may create objects of this class to become a TCF server.
*/
public class ServerTCP extends ServerSocket {
-
+
private static class ServerPeer extends AbstractPeer {
ServerPeer(Map<String,String> attrs) {
super(attrs);
}
}
-
+
private static class RemotePeer extends AbstractPeer {
RemotePeer(Map<String,String> attrs) {
super(attrs);
}
}
-
+
private final String name;
private List<ServerPeer> peers;
private Thread thread;
-
+
public ServerTCP(String name, int port) throws IOException {
super(port);
this.name = name;
@@ -93,7 +93,7 @@ public class ServerTCP extends ServerSocket {
thread.setDaemon(true);
thread.start();
}
-
+
private ServerPeer getLocalPeer(String addr) {
for (ServerPeer p : peers) {
if (addr.equals(p.getAttributes().get(IPeer.ATTR_IP_HOST))) return p;
@@ -106,15 +106,15 @@ public class ServerTCP extends ServerSocket {
attrs.put(IPeer.ATTR_IP_HOST, addr);
attrs.put(IPeer.ATTR_IP_PORT, Integer.toString(getLocalPort()));
attrs.put(IPeer.ATTR_PROXY, "");
- ServerPeer p = new ServerPeer(attrs);
+ ServerPeer p = new ServerPeer(attrs);
peers.add(p);
return p;
}
-
+
private IPeer getLocalPeer(Socket socket) {
return getLocalPeer(socket.getLocalAddress().getHostAddress());
}
-
+
private IPeer getRemotePeer(Socket socket) {
String addr = socket.getInetAddress().getHostAddress();
for (IPeer p : Protocol.getLocator().getPeers().values()) {
@@ -126,7 +126,7 @@ public class ServerTCP extends ServerSocket {
attrs.put(IPeer.ATTR_IP_HOST, addr);
return new RemotePeer(attrs);
}
-
+
@Override
public void close() throws IOException {
if (peers != null) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
index 14d2e0cf5..ac16d4d6c 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,16 +19,16 @@ import org.eclipse.tm.tcf.protocol.IPeer;
*
* StreamChannel implements communication link connecting two end points (peers).
* The channel asynchronously transmits messages: commands, results and events.
- *
+ *
* StreamChannel uses escape sequences to represent End-Of-Message and End-Of-Stream markers.
- *
+ *
* Clients can subclass StreamChannel to support particular stream oriented transport (wire) protocol.
* Also, see ChannelTCP for a concrete IChannel implementation that works on top of TCP sockets as a transport.
*/
public abstract class StreamChannel extends AbstractChannel {
public static final int ESC = 3;
-
+
private int bin_data_size;
public StreamChannel(IPeer remote_peer) {
@@ -41,7 +41,7 @@ public abstract class StreamChannel extends AbstractChannel {
protected abstract int get() throws IOException;
protected abstract void put(int n) throws IOException;
-
+
protected void put(byte[] buf) throws IOException {
for (byte b : buf) put(b & 0xff);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
index 23f6e59b7..5def99b87 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@ import java.util.Collection;
* A single channel may be used to communicate with multiple services.
* Multiple channels may be used to connect the same peers, however no command or event
* ordering is guaranteed across channels.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* Clients can extend abstract implementations of IChannel: AbstractChannel or StreamChannel.
*/
@@ -47,13 +47,13 @@ public interface IChannel {
* @param name - command name
* @param args - command arguments encoded into array of bytes
* @param done - call back object
- * @return pending command handle
+ * @return pending command handle
*/
IToken sendCommand(IService service, String name, byte[] args, ICommandListener done);
/**
* Command listener interface. Clients implement this interface to
- * receive command results.
+ * receive command results.
*/
interface ICommandListener {
@@ -105,11 +105,11 @@ public interface IChannel {
/**
* Get current level of out-bound traffic congestion.
- *
+ *
* @return integer value in range –100..100, where –100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
- *
+ *
* Note: in-bound traffic congestion is detected by framework and reported to
* remote peer without client needed to be involved. Clients willing to provide
* additional data about local congestion should register itself using
@@ -175,14 +175,14 @@ public interface IChannel {
* Subscribe a command server. The server will be notified about command
* messages received through this channel for given service.
* @param service - local service implementation
- * @param server - implementation of service commands listener
+ * @param server - implementation of service commands listener
*/
void addCommandServer(IService service, ICommandServer server);
/**
* Remove a command server.
* @param service - local service implementation
- * @param server - implementation of service commands listener
+ * @param server - implementation of service commands listener
*/
void removeCommandServer(IService service, ICommandServer server);
@@ -191,7 +191,7 @@ public interface IChannel {
* Services usually define a service specific event listener interface,
* which is implemented using this generic listener.
* Clients should user service specific listener interface,
- * unless no such interface is defined.
+ * unless no such interface is defined.
*/
interface IEventListener {
/**
@@ -205,14 +205,14 @@ public interface IChannel {
/**
* Subscribe an event listener for given service.
* @param service - remote service proxy
- * @param server - implementation of service event listener
+ * @param server - implementation of service event listener
*/
void addEventListener(IService service, IEventListener listener);
/**
* Unsubscribe an event listener for given service.
* @param service - remote service proxy
- * @param server - implementation of service event listener
+ * @param server - implementation of service event listener
*/
void removeEventListener(IService service, IEventListener listener);
@@ -266,7 +266,7 @@ public interface IChannel {
* Return null if implementation of the interface is not available.
*/
<V extends IService> V getRemoteService(Class<V> service_interface);
-
+
/**
* Install a service proxy object on this channel.
* This method can be called only from channel open call-back.
@@ -276,10 +276,10 @@ public interface IChannel {
* It is not allowed to install more then one proxy for a given service interface on
* a particular channel.
* @param service_interface - service interface class
- * @param service_proxy - service proxy object
+ * @param service_proxy - service proxy object
*/
<V extends IService> void setServiceProxy(Class<V> service_interface, IService service_proxy);
-
+
/**
* Close communication channel.
*/
@@ -290,7 +290,7 @@ public interface IChannel {
* @param error - cause of channel termination
*/
void terminate(Throwable error);
-
+
/**
* Redirect this channel to given peer using this channel remote peer locator service as a proxy.
* @param peer_id - peer that will become new remote communication endpoint of this channel
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
index 86b85a1f9..e110c7133 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -14,17 +14,17 @@ import java.util.Map;
/**
* This interface defines TCF standard format of error reports.
- *
+ *
* Exception objects can implement this interface to make error report details
* available for clients.
- *
+ *
* Usage example:
- *
+ *
* Exception x = ...
* if (x instanceof IErrorReport) {
* int error_code = ((IErrorReport)x).getErrorCode();
* ...
- *
+ *
* @noextend This interface is not intended to be extended by clients.
*/
public interface IErrorReport {
@@ -40,28 +40,28 @@ public interface IErrorReport {
ERROR_ALT_CODE = "AltCode", // integer
ERROR_ALT_ORG = "AltOrg", // string
ERROR_CAUSED_BY = "CausedBy"; // object
-
+
/** Error severity codes */
public static final int
SEVERITY_ERROR = 0,
SEVERITY_WARNING = 1,
SEVERITY_FATAL = 2;
-
+
/** Error code ranges */
public static final int
/** Standard TCF code range */
CODE_STD_MIN = 0,
CODE_STD_MAX = 0xffff,
-
+
/** Service specific codes. Decoding requires service ID. */
CODE_SERVICE_SPECIFIC_MIN = 0x10000,
CODE_SERVICE_SPECIFIC_MAX = 0x1ffff,
-
+
/** Reserved codes - will never be used by the TCF standard */
CODE_RESERVED_MIN = 0x20000,
CODE_RESERVED_MAX = 0x2ffff;
-
- /** Standard TCF error codes */
+
+ /** Standard TCF error codes */
public static final int
TCF_ERROR_OTHER = 1,
TCF_ERROR_JSON_SYNTAX = 2,
@@ -88,12 +88,12 @@ public interface IErrorReport {
TCF_ERROR_UNSUPPORTED = 23,
TCF_ERROR_INV_DATA_TYPE = 24,
TCF_ERROR_INV_COMMAND = 25;
-
+
public int getErrorCode();
-
+
public int getAltCode();
-
+
public String getAltOrg();
-
+
public Map<String,Object> getAttributes();
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
index 15da38e28..f94d2d0de 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,7 +13,7 @@ package org.eclipse.tm.tcf.protocol;
/**
* Clients of stand-alone version the framework should implement this interface and call Protocol.setEventQueue.
* Eclipse based clients don't need to implement IEventQueue since the implementation is provide by TCF bundle activator.
- *
+ *
* Implementation should encapsulate a queue and asynchronous event dispatch machinery, which
* extracts events from the queue and dispatches them by calling event's run() method.
* The implementation is used by framework to queue and dispatch all events.
@@ -40,7 +40,7 @@ public interface IEventQueue {
/**
* Get current level of queue congestion.
- *
+ *
* @return integer value in range –100..100, where –100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
index b2f869a64..af31d6425 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,10 +18,10 @@ public interface ILogger {
/**
* Add an entry into a log.
- *
+ *
* This method can be invoked from any thread.
- *
- * @param msg - log entry text.
+ *
+ * @param msg - log entry text.
* @param x - a Java exception associated with the log entry or null.
*/
void log(String msg, Throwable x);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
index 3f96d298a..ecacb224a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,14 +18,14 @@ import java.util.Map;
* target depending on services it implements.
* List of currently known peers can be retrieved by
* calling ILocator.getPeers()
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* Client can extends the abstract IPeer implementation: AbstractPeer.
*/
public interface IPeer {
/**
- * Peer property names. Implementation can define additional properties.
+ * Peer property names. Implementation can define additional properties.
*/
static final String
ATTR_ID = "ID",
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
index 583d41039..1f1a3ab48 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,11 +13,11 @@ package org.eclipse.tm.tcf.protocol;
/**
* Base interface for all service interfaces. A client can get list of available services
* by calling IChannel.getLocalServices() and IChannel.getRemoteServices().
- *
+ *
* Remote services are represented by a proxy objects that implement service interfaces by
* translating method calls to TCF messages and sending them to a remote peer.
* When communication channel is open, TCF automatically creates proxies for standard services.
- * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
+ * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
*/
public interface IService {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
index fe9457f4a..c7339b608 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Anyware Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Anyware Technologies - initial API and implementation
*******************************************************************************/
@@ -12,11 +12,11 @@ package org.eclipse.tm.tcf.protocol;
/**
* Clients can implement this interface if they want to provide implementation of a local service or
- * remote service proxy.
+ * remote service proxy.
*/
public interface IServiceProvider {
-
+
public IService[] getLocalService(IChannel channel);
-
+
public IService getServiceProxy(IChannel channel, String service_name);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
index e03f7ed7d..4fa83890d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,7 +13,7 @@ package org.eclipse.tm.tcf.protocol;
/**
* IToken is created by the framework for each command sent to a remote peer.
* It is used to match results to commands and to cancel pending commands.
- *
+ *
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
@@ -24,7 +24,7 @@ public interface IToken {
* canceled by this method only if it was not transmitted yet to remote peer
* for execution. Successfully canceled command does not produce any result
* messages.
- *
+ *
* @return true if successful.
*/
boolean cancel();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
index c8a7a8187..3683f367a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,12 +13,12 @@ package org.eclipse.tm.tcf.protocol;
/**
* ITransportProvider represents communication protocol that can be used to open TCF communication channels.
* Examples of transports are: TCP/IP, RS-232, USB.
- *
+ *
* Client can implement this interface if they want to provide support for a transport that is not
* supported directly by the framework.
*/
public interface ITransportProvider {
-
+
/**
* Return transport name. Same as used as peer attribute, @see IPeer.ATTR_TRANSPORT_NAME
* @return transport name.
@@ -30,7 +30,7 @@ public interface ITransportProvider {
* Note: the channel can be not fully open yet when this method returns.
* It’s state can be IChannel.STATE_OPENNING.
* Protocol.Listener will be called when the channel will be opened or closed.
- * @param peer - a IPeer object that describes remote end-point of the channel.
+ * @param peer - a IPeer object that describes remote end-point of the channel.
* @return TCF communication channel.
*/
IChannel openChannel(IPeer peer);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
index a612cbfe9..e9f595103 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,18 +30,18 @@ import org.eclipse.tm.tcf.core.Base64;
*
* Reading of JSON produces data structure that consists of objects of these classes:
* Boolean, Number, String, Collection, Map.
- *
+ *
* Writing of JSON is supported for:
* Boolean, Number, String, char[], byte[], Object[], Collection, Map
- *
+ *
* Clients can enable writing support for objects of a other classes by
* registering ObjectWriter interface implementation.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class JSON {
-
+
/**
* Clients implement ObjectWriter interface when they want to enable marshaling of
* object classes that are not directly supported by JSON library.
@@ -49,38 +49,38 @@ public final class JSON {
public interface ObjectWriter {
void write(Object o) throws IOException;
}
-
- private static final Map<Class<?>,ObjectWriter> object_writers = new HashMap<Class<?>,ObjectWriter>();
-
+
+ private static final Map<Class<?>,ObjectWriter> object_writers = new HashMap<Class<?>,ObjectWriter>();
+
/** Wrapper class for binary byte blocs */
public final static class Binary {
public final byte[] bytes;
public final int offs;
public final int size;
-
+
public Binary(byte[] bytes, int offs, int size) {
this.bytes = bytes;
this.offs = offs;
this.size = size;
}
}
-
+
private static char[] tmp_buf = new char[0x1000];
private static byte[] tmp_bbf = new byte[0x1000];
private static int tmp_buf_pos;
private static boolean zero_copy;
private static Binary[] bin_buf = new Binary[0x10];
private static int bin_buf_pos;
-
+
private static byte[] inp;
private static int inp_pos;
private static int cur_ch;
-
- // This buffer is used to create nice error reports
+
+ // This buffer is used to create nice error reports
private static final char[] err_buf = new char[100];
private static int err_buf_pos;
private static int err_buf_cnt;
-
+
/**
* Add a handler for converting objects of a particular class into JSON.
* @param cls - a class
@@ -103,7 +103,7 @@ public final class JSON {
}
tmp_buf[tmp_buf_pos++] = ch;
}
-
+
/**
* Write a string into JSON output buffer.
* The string is written "as-is". Call writeObject() to convert a String into JSON string.
@@ -118,7 +118,7 @@ public final class JSON {
else tmp_buf[tmp_buf_pos++] = ch;
}
}
-
+
/**
* Write a non-negative integer number into JSON output buffer.
* Clients should not call this method directly, except from ObjectWriter implementation.
@@ -129,7 +129,7 @@ public final class JSON {
if (n >= 10) writeUInt(n / 10);
write((char)('0' + n % 10));
}
-
+
private static int readUTF8Char() {
if (inp_pos >= inp.length) return -1;
int ch = inp[inp_pos++];
@@ -165,7 +165,7 @@ public final class JSON {
err_buf_cnt++;
}
}
-
+
private static void error() throws IOException {
error("syntax error");
}
@@ -215,7 +215,7 @@ public final class JSON {
read();
return n;
}
-
+
private static Object readFloat(boolean sign, BigInteger val) throws IOException {
int scale = 0;
int fraction = 0;
@@ -241,7 +241,7 @@ public final class JSON {
if (sign) val = val.negate();
return new BigDecimal(val, fraction - scale);
}
-
+
private static Object readNestedObject() throws IOException {
switch (cur_ch) {
case '(':
@@ -435,7 +435,7 @@ public final class JSON {
}
return l.toArray();
}
-
+
/**
* Write an object into JSON output buffer.
* Clients should not call this method directly, except from ObjectWriter implementation.
@@ -588,22 +588,22 @@ public final class JSON {
out_pos += b.size;
}
else if (ch < 0x80) {
- tmp_bbf[out_pos++] = (byte)ch;
+ tmp_bbf[out_pos++] = (byte)ch;
}
else if (ch < 0x800) {
- tmp_bbf[out_pos++] = (byte)((ch >> 6) | 0xc0);
- tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 6) | 0xc0);
+ tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
}
else if (ch < 0x10000) {
- tmp_bbf[out_pos++] = (byte)((ch >> 12) | 0xe0);
- tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
- tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 12) | 0xe0);
+ tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
}
else {
- tmp_bbf[out_pos++] = (byte)((ch >> 18) | 0xf0);
- tmp_bbf[out_pos++] = (byte)((ch >> 12) & 0x3f | 0x80);
- tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
- tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 18) | 0xf0);
+ tmp_bbf[out_pos++] = (byte)((ch >> 12) & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
}
}
byte[] res = new byte[out_pos];
@@ -675,7 +675,7 @@ public final class JSON {
read();
return readSequence();
}
-
+
public static byte[] toByteArray(Object o) {
if (o == null) return null;
if (o instanceof byte[]) return (byte[])o;
@@ -683,7 +683,7 @@ public final class JSON {
if (o instanceof String) return Base64.toByteArray(((String)o).toCharArray());
throw new Error();
}
-
+
public static void toByteArray(byte[] buf, int offs, int size, Object o) {
if (o instanceof char[]) Base64.toByteArray(buf, offs, size, (char[])o);
else if (o instanceof String) Base64.toByteArray(buf, offs, size, ((String)o).toCharArray());
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
index 3f9939b21..5e6694ec9 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,13 +25,13 @@ import org.eclipse.tm.tcf.services.ILocator;
* 1. the framework event queue and dispatch thread;
* 2. local instance of Locator service, which maintains a list of available targets;
* 3. list of open communication channels.
- *
+ *
* It also provides utility methods for posting asynchronous events,
* including delayed events (timers).
- *
+ *
* Before TCF can be used, it should be given an object implementing IEventQueue interface:
* @see #setEventQueue
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@@ -41,7 +41,7 @@ public final class Protocol {
private static ILogger logger;
private static final TreeSet<Timer> timer_queue = new TreeSet<Timer>();
private static int timer_cnt;
-
+
private static class Timer implements Comparable<Timer>{
final int id;
final long time;
@@ -103,12 +103,12 @@ public final class Protocol {
* executes <code>run</code> methods of that objects in a sequence by a single thread.
* The thread in referred as TCF event dispatch thread. Objects in the queue are called TCF events.
* Executing <code>run</code> method of an event is also called dispatching of the event.
- *
+ *
* Only few methods in TCF APIs are thread safe - can be invoked from any thread.
- * If a method description does not say "can be invoked from any thread" explicitly -
+ * If a method description does not say "can be invoked from any thread" explicitly -
* the method must be invoked from TCF event dispatch thread. All TCF listeners are
* invoked from the dispatch thread.
- *
+ *
* @param event_queue - IEventQueue implementation.
*/
public static void setEventQueue(IEventQueue event_queue) {
@@ -185,7 +185,7 @@ public final class Protocol {
}
}
}
-
+
/**
* Causes <code>runnable</code> to have its <code>run</code>
* method called in the dispatch thread of the framework.
@@ -226,17 +226,17 @@ public final class Protocol {
}
}
}
-
+
/**
* Set framework logger.
* By default Eclipse logger is used, or System.err if TCF is used stand-alone.
- *
+ *
* @param logger - an object implementing ILogger interface.
*/
public static synchronized void setLogger(ILogger logger) {
Protocol.logger = logger;
}
-
+
/**
* Logs the given message.
* @see #setLogger
@@ -256,13 +256,13 @@ public final class Protocol {
/**
* Get instance of the framework locator service.
* The service can be used to discover available remote peers.
- *
+ *
* @return instance of ILocator.
*/
public static ILocator getLocator() {
return LocatorService.getLocator();
}
-
+
/**
* Return an array of all open channels.
* @return an array of IChannel
@@ -271,11 +271,11 @@ public final class Protocol {
assert isDispatchThread();
return TransportManager.getOpenChannels();
}
-
+
/**
* Interface to be implemented by clients willing to be notified when
* new TCF communication channel is opened.
- *
+ *
* The interface allows a client to get pointers to channel objects
* that were opened by somebody else. If a client open a channel itself, it already has
* the pointer and does not need Protocol.ChannelOpenListener. If a channel is created,
@@ -285,7 +285,7 @@ public final class Protocol {
public interface ChannelOpenListener {
public void onChannelOpen(IChannel channel);
}
-
+
/**
* Add a listener that will be notified when new channel is opened.
* @param listener
@@ -312,28 +312,28 @@ public final class Protocol {
assert isDispatchThread();
TransportManager.sendEvent(service_name, event_name, data);
}
-
+
/**
* Call back after all TCF messages sent by this host up to this moment are delivered
* to their intended target. This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need cross channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after pending communication
+ * Most clients don't need cross channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after pending communication
* messages are delivered to corresponding targets.
*/
public static void sync(Runnable done) {
assert isDispatchThread();
TransportManager.sync(done);
}
-
+
/**
* Clients implement CongestionMonitor interface to monitor usage of local resources,
* like, for example, display queue size - if the queue becomes too big, UI response time
* can become too high, or it can crash all together because of OutOfMemory errors.
- * TCF flow control logic prevents such conditions by throttling traffic coming from remote peers.
+ * TCF flow control logic prevents such conditions by throttling traffic coming from remote peers.
* Note: Local (in-bound traffic) congestion is detected by framework and reported to
* remote peer without client needed to be involved. Only clients willing to provide
* additional data about local congestion should implement CongestionMonitor and
@@ -341,13 +341,13 @@ public final class Protocol {
*/
public interface CongestionMonitor {
/**
- * Get current level of client resource utilization.
+ * Get current level of client resource utilization.
* @return integer value in range –100..100, where –100 means all resources are free,
* 0 means optimal load, and positive numbers indicate level of congestion.
*/
int getCongestionLevel();
}
-
+
/**
* Register a congestion monitor.
* @param monitor - client implementation of CongestionMonitor interface
@@ -357,7 +357,7 @@ public final class Protocol {
assert isDispatchThread();
congestion_monitors.add(monitor);
}
-
+
/**
* Unregister a congestion monitor.
* @param monitor - client implementation of CongestionMonitor interface
@@ -366,10 +366,10 @@ public final class Protocol {
assert isDispatchThread();
congestion_monitors.remove(monitor);
}
-
+
/**
* Get current level of local traffic congestion.
- *
+ *
* @return integer value in range –100..100, where –100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
@@ -390,15 +390,15 @@ public final class Protocol {
}
/**
- * Register s service provider.
+ * Register s service provider.
* @param provider - IServiceProvider implementation
*/
public static void addServiceProvider(IServiceProvider provider){
ServiceManager.addServiceProvider(provider);
}
-
+
/**
- * Unregister s service provider.
+ * Unregister s service provider.
* @param provider - IServiceProvider implementation
*/
public static void removeServiceProvider(IServiceProvider provider){
@@ -406,16 +406,16 @@ public final class Protocol {
}
/**
- * Register s transport provider.
+ * Register s transport provider.
* @param provider - ITransportProvider implementation
*/
public static void addTransportProvider(ITransportProvider provider){
assert isDispatchThread();
TransportManager.addTransportProvider(provider);
}
-
+
/**
- * Unregister s transport provider.
+ * Unregister s transport provider.
* @param provider - ITransportProvider implementation
*/
public static void removeTransportProvider(ITransportProvider provider){
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
index 9e40654bb..ae6b94f44 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,11 +19,11 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
* Breakpoint is represented by unique identifier and set of properties.
* Breakpoint identifier (String id) needs to be unique across all hosts and targets.
- *
+ *
* Breakpoint properties (Map<String,Object>) is extendible collection of named attributes,
* which define breakpoint location and behavior. This module defines some common
* attribute names (see PROP_*), host tools and target agents may support additional attributes.
- *
+ *
* For each breakpoint a target agent maintains another extendible collection of named attributes:
* breakpoint status (Map<String,Object>, see STATUS_*). While breakpoint properties are
* persistent and represent user input, breakpoint status reflects dynamic target agent reports
@@ -39,7 +39,7 @@ public interface IBreakpoints extends IService {
/**
* Breakpoint property names.
*/
- static final String
+ static final String
PROP_ID = "ID", // String
PROP_ENABLED = "Enabled", // Boolean
PROP_TYPE = "BreakpointType", // String
@@ -63,31 +63,31 @@ public interface IBreakpoints extends IService {
PROP_TEMPORARY = "Temporary"; // Boolean
/**
- * BreakpointType values
+ * BreakpointType values
*/
static final String
TYPE_RELATIVE = "Software",
TYPE_ABSOLUTE = "Hardware",
TYPE_AUTO = "Auto";
- /**
- * AccessMode values
- */
- static final int
+ /**
+ * AccessMode values
+ */
+ static final int
ACCESSMODE_READ = 0x01,
- ACCESSMODE_WRITE = 0x02,
+ ACCESSMODE_WRITE = 0x02,
ACCESSMODE_EXECUTE = 0x04,
ACCESSMODE_CHANGE = 0x08;
/**
- * TimeScale values
+ * TimeScale values
*/
- static final String
+ static final String
TIMESCALE_RELATIVE = "Relative",
TIMESCALE_ABSOLUTE = "Absolute";
-
+
/**
- * TimeUnits values
+ * TimeUnits values
*/
static final String
TIMEUNIT_NSECS = "Nanoseconds",
@@ -103,7 +103,7 @@ public interface IBreakpoints extends IService {
STATUS_FILE = "File", // String
STATUS_LINE = "Line", // Number
STATUS_COLUMN = "Column"; // Number
-
+
/**
* Breakpoint instance field names.
*/
@@ -111,7 +111,7 @@ public interface IBreakpoints extends IService {
INSTANCE_ERROR = "Error", // String
INSTANCE_CONTEXT = "LocationContext", // String
INSTANCE_ADDRESS = "Address"; // Number
-
+
/**
* Breakpoint service capabilities.
*/
@@ -136,11 +136,11 @@ public interface IBreakpoints extends IService {
/**
* Download breakpoints data to target agent.
- * The command is intended to be used only to initialize target breakpoints table
- * when communication channel is open. After that, host should
+ * The command is intended to be used only to initialize target breakpoints table
+ * when communication channel is open. After that, host should
* notify target about (incremental) changes in breakpoint data by sending
* add, change and remove commands.
- *
+ *
* @param properties - array of breakpoints.
* @param done - command result call back object.
* @return - pending command handle.
@@ -186,7 +186,7 @@ public interface IBreakpoints extends IService {
* @return - pending command handle.
*/
IToken remove(String[] ids, DoneCommand done);
-
+
/**
* Upload IDs of breakpoints known to target agent.
* @param done - command result call back object.
@@ -199,7 +199,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetIDs {
/**
- * Called when 'getIDs' command is done.
+ * Called when 'getIDs' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param ids - IDs of breakpoints known to target agent.
@@ -219,7 +219,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetProperties {
/**
- * Called when 'getProperties' command is done.
+ * Called when 'getProperties' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param properties - properties of the breakpoint.
@@ -240,7 +240,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetStatus {
/**
- * Called when 'getStatus' command is done.
+ * Called when 'getStatus' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param status - status of the breakpoint.
@@ -266,7 +266,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetCapabilities {
/**
- * Called when 'getCapabilities' command is done.
+ * Called when 'getCapabilities' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param capabilities - breakpoints service capabilities description.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
index 52694f303..e3b84dd1e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.tm.tcf.protocol.IService;
import org.eclipse.tm.tcf.protocol.IToken;
/**
- * This is optional service that can be implemented by a peer.
+ * This is optional service that can be implemented by a peer.
* If implemented, the service can be used for testing of the peer and
* communication channel functionality and reliability.
*/
@@ -24,17 +24,17 @@ import org.eclipse.tm.tcf.protocol.IToken;
public interface IDiagnostics extends IService {
static final String NAME = "Diagnostics";
-
+
/**
* 'echo' command result returns same string that was given as command argument.
* The command is used to test communication channel ability to transmit arbitrary strings in
- * both directions.
+ * both directions.
* @param s - any string.
* @param done - command result call back object.
* @return - pending command handle.
*/
IToken echo(String s, DoneEcho done);
-
+
/**
* Call back interface for 'echo' command.
*/
@@ -51,13 +51,13 @@ public interface IDiagnostics extends IService {
/**
* 'echoFP' command result returns same floating point number that was given as command argument.
* The command is used to test communication channel ability to transmit arbitrary floating point numbers in
- * both directions.
+ * both directions.
* @param n - any floating point number.
* @param done - command result call back object.
* @return - pending command handle.
*/
IToken echoFP(BigDecimal n, DoneEchoFP done);
-
+
/**
* Call back interface for 'echoFP' command.
*/
@@ -83,7 +83,7 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken getTestList(DoneGetTestList done);
-
+
/**
* Call back interface for 'getTestList' command.
*/
@@ -92,11 +92,11 @@ public interface IDiagnostics extends IService {
* Called when 'getTestList' command is done.
* @param token - command handle.
* @param error - error object or null.
- * @param list - names of tests that are supported by the peer.
+ * @param list - names of tests that are supported by the peer.
*/
void doneGetTestList(IToken token, Throwable error, String[] list);
}
-
+
/**
* Run a test. When started, a test performs a predefined set actions.
* Nature of test actions is uniquely identified by test name.
@@ -108,7 +108,7 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken runTest(String name, DoneRunTest done);
-
+
/**
* Call back interface for 'runTest' command.
*/
@@ -129,7 +129,7 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken cancelTest(String context_id, DoneCancelTest done);
-
+
/**
* Call back interface for 'cancelTest' command.
*/
@@ -141,7 +141,7 @@ public interface IDiagnostics extends IService {
*/
void doneCancelTest(IToken token, Throwable error);
}
-
+
/**
* Get information about a symbol in text execution context.
* @param context_id
@@ -150,7 +150,7 @@ public interface IDiagnostics extends IService {
* @return
*/
IToken getSymbol(String context_id, String symbol_name, DoneGetSymbol done);
-
+
/**
* Call back interface for 'getSymbol' command.
*/
@@ -163,7 +163,7 @@ public interface IDiagnostics extends IService {
*/
void doneGetSymbol(IToken token, Throwable error, ISymbol symbol);
}
-
+
/**
* Interface to access result value of 'getSymbol' command.
*/
@@ -176,7 +176,7 @@ public interface IDiagnostics extends IService {
boolean isLocal();
boolean isAbs();
}
-
+
/**
* Create a pair of virtual streams, @see IStreams service.
* Remote ends of the streams are connected, so any data sent into 'inp' stream
@@ -188,12 +188,12 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken createTestStreams(int inp_buf_size, int out_buf_size, DoneCreateTestStreams done);
-
+
/**
* Call back interface for 'createTestStreams' command.
*/
interface DoneCreateTestStreams {
-
+
/**
* Called when 'createTestStreams' command is done.
* @param token - command handle.
@@ -203,7 +203,7 @@ public interface IDiagnostics extends IService {
*/
void doneCreateTestStreams(IToken token, Throwable error, String inp_id, String out_id);
}
-
+
/**
* Dispose a virtual stream that was created by 'createTestStreams' command.
* @param id - the stream ID.
@@ -211,12 +211,12 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken disposeTestStream(String id, DoneDisposeTestStream done);
-
+
/**
* Call back interface for 'disposeTestStream' command.
*/
interface DoneDisposeTestStream {
-
+
/**
* Called when 'createTestStreams' command is done.
* @param token - command handle.
@@ -224,7 +224,7 @@ public interface IDiagnostics extends IService {
*/
void doneDisposeTestStream(IToken token, Throwable error);
}
-
+
/**
* Send a command that is not implemented by peer.
* Used to test handling of 'N' messages by communication channel.
@@ -232,9 +232,9 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken not_implemented_command(DoneNotImplementedCommand done);
-
+
interface DoneNotImplementedCommand {
-
+
/**
* Called when 'not_implemented_command' command is done.
* @param token - command handle.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
index 0018fb837..82f40d7bb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,13 +25,13 @@ public interface IExpressions extends IService {
* Service name.
*/
static final String NAME = "Expressions";
-
+
/**
* Expression object represent an expression that can be evaluated by remote target.
* It has a unique ID and contains all information necessary to compute a value.
* The object data usually includes:
* 1. process, thread or stack frame ID that should be used to resolve symbol names;
- * 2. a script that can compute a value, like "x.y + z"
+ * 2. a script that can compute a value, like "x.y + z"
*/
interface Expression {
/**
@@ -39,53 +39,53 @@ public interface IExpressions extends IService {
* @return context ID.
*/
String getID();
-
+
/**
* Get parent context ID.
* @return parent context ID.
*/
String getParentID();
-
+
/**
* Get expression script language ID.
* @return language ID.
*/
String getLanguage();
-
+
/**
* Return expression string - the script part of the context.
- * @return expression script string
+ * @return expression script string
*/
String getExpression();
-
+
/**
* Get size of expression value in bits.
* Can be 0 if value size is even number of bytes, use getSize() in such case.
* @return size in bits.
*/
int getBits();
-
+
/**
* Get size in bytes. The size can include extra (unused) bits.
* This is "static" or "declared" size - as determined by expression type.
* @return size in bytes.
*/
int getSize();
-
+
/**
* Get expression type ID. Symbols service can be used to get type properties.
* This is "static" or "declared" type ID, actual type of a value can be different -
- * if expression language supports dynamic typing.
+ * if expression language supports dynamic typing.
* @return type ID.
*/
String getTypeID();
-
+
/**
* Check if the expression can be assigned a new value.
* @return true if can assign.
*/
boolean canAssign();
-
+
/**
* Get complete map of context properties.
* @return map of context properties.
@@ -111,14 +111,14 @@ public interface IExpressions extends IService {
* Note that same expression can be evaluated multiple times with different results.
*/
interface Value {
-
+
/**
* Get value type class.
* @see ISymbols.TypeClass
* @return
*/
ISymbols.TypeClass getTypeClass();
-
+
/**
* Get value type ID. Symbols service can be used to get type properties.
* @return type ID.
@@ -133,11 +133,11 @@ public interface IExpressions extends IService {
/**
* Check endianess of the values.
- * Big endian means decreasing numeric significance with increasing byte number.
+ * Big endian means decreasing numeric significance with increasing byte number.
* @return true if big endian.
*/
boolean isBigEndian();
-
+
/**
* Get value as array of bytes.
* @return value as array of bytes.
@@ -163,8 +163,8 @@ public interface IExpressions extends IService {
/**
* Retrieve expression context info for given context ID.
* @see Expression
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
*/
@@ -186,16 +186,16 @@ public interface IExpressions extends IService {
/**
* Retrieve children IDs for given parent ID.
* Meaning of the operation depends on parent kind:
- * 1. expression with type of a struct, union, or class - fields;
+ * 1. expression with type of a struct, union, or class - fields;
* 2. expression with type of an enumeration - enumerators;
* 3. expression with type of an array - array elements;
* 4. stack frame - function arguments and local variables;
* 5. thread - top stack frame function arguments and local variables;
* 6. process - global variables;
- *
+ *
* Children list does *not* include IDs of expressions that were created by clients
* using "create" command.
- *
+ *
* @param parent_context_id – parent context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
@@ -214,7 +214,7 @@ public interface IExpressions extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* Create an expression context.
* The context should be disposed after use.
@@ -246,7 +246,7 @@ public interface IExpressions extends IService {
* @return - pending command handle.
*/
IToken dispose(String id, DoneDispose done);
-
+
/**
* Client call back interface for dispose().
*/
@@ -266,7 +266,7 @@ public interface IExpressions extends IService {
* @return - pending command handle.
*/
IToken evaluate(String id, DoneEvaluate done);
-
+
/**
* Client call back interface for evaluate().
*/
@@ -279,7 +279,7 @@ public interface IExpressions extends IService {
*/
void doneEvaluate(IToken token, Exception error, Value value);
}
-
+
/**
* Assign a value to memory location determined by an expression.
* @param id - expression ID.
@@ -288,7 +288,7 @@ public interface IExpressions extends IService {
* @return - pending command handle.
*/
IToken assign(String id, byte[] value, DoneAssign done);
-
+
/**
* Client call back interface for assign().
*/
@@ -300,7 +300,7 @@ public interface IExpressions extends IService {
*/
void doneAssign(IToken token, Exception error);
}
-
+
/**
* Add expressions service event listener.
* @param listener - event listener implementation.
@@ -315,12 +315,12 @@ public interface IExpressions extends IService {
/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/
interface ExpressionsListener {
/**
- * Called when expression value was changed and clients
+ * Called when expression value was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached expression data.
* Not every change is notified - it is not possible,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
index 1bcaf2dc7..eab69e96b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* File System service provides file transfer (and more generally file
* system access) functionality in TCF. The service design is
* derived from SSH File Transfer Protocol specifications.
- *
+ *
* Request Synchronization and Reordering
*
* The protocol and implementations MUST process requests relating to
@@ -49,7 +49,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* performed by the server. If the server's queues are full, it should
* not read any more data from the stream, and flow control will prevent
* the client from sending more requests.
- *
+ *
* File Names
*
* This protocol represents file names as strings. File names are
@@ -77,7 +77,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* using a slash ('/') as the separator, and that will work as expected.
*/
public interface IFileSystem extends IService {
-
+
/**
* Service name.
*/
@@ -86,8 +86,8 @@ public interface IFileSystem extends IService {
/**
* Flags to be used with open() method.
*/
- static final int
-
+ static final int
+
/**
* Open the file for reading.
*/
@@ -102,7 +102,7 @@ public interface IFileSystem extends IService {
/**
* Force all writes to append data at the end of the file.
*/
- TCF_O_APPEND = 0x00000004,
+ TCF_O_APPEND = 0x00000004,
/**
* If this flag is specified, then a new file will be created if one
@@ -147,30 +147,30 @@ public interface IFileSystem extends IService {
* server normally returns all attributes it knows about.
*/
final static class FileAttrs {
-
+
/**
* The `flags' specify which of the fields are present.
*/
public final int flags;
-
+
/**
* The `size' field specifies the size of the file in bytes.
*/
public final long size;
-
+
/**
* The `uid' and `gid' fields contain numeric Unix-like user and group
* identifiers, respectively.
*/
public final int uid;
public final int gid;
-
+
/**
* The `permissions' field contains a bit mask of file permissions as
* defined by posix [1].
*/
public final int permissions;
-
+
/**
* The `atime' and `mtime' contain the access and modification times of
* the files, respectively. They are represented as milliseconds from
@@ -183,7 +183,7 @@ public interface IFileSystem extends IService {
* Additional (non-standard) attributes.
*/
public final Map<String,Object> attributes;
-
+
public FileAttrs(int flags, long size, int uid, int gid,
int permissions, long atime, long mtime, Map<String,Object> attributes) {
this.flags = flags;
@@ -195,10 +195,10 @@ public interface IFileSystem extends IService {
this.mtime = mtime;
this.attributes = attributes;
}
-
+
/**
* Determines if the file system object is a file on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system can be considered to have "contents" that
* have the potential to be read and written as a byte stream.
*/
@@ -209,7 +209,7 @@ public interface IFileSystem extends IService {
/**
* Determines if the file system object is a directory on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system is a directory.
* That is, it contains entries that can be interpreted as other files.
*/
@@ -218,7 +218,7 @@ public interface IFileSystem extends IService {
return (permissions & S_IFMT) == S_IFDIR;
}
}
-
+
/**
* The following flags are defined for the 'permissions' field:
*/
@@ -246,14 +246,14 @@ public interface IFileSystem extends IService {
S_IROTH = 00004, // others have read permission
S_IWOTH = 00002, // others have write permission
S_IXOTH = 00001; // others have execute permission
-
+
final static class DirEntry {
/**
* `filename' is a file name being returned. It is a relative name within
* the directory, without any path components;
*/
public final String filename;
-
+
/**
* `longname' is an expanded format for the file name, similar to what
* is returned by "ls -l" on Unix systems.
@@ -265,33 +265,33 @@ public interface IFileSystem extends IService {
* use the attrs field instead.
*/
public final String longname;
-
+
/**
* `attrs' is the attributes of the file.
*/
public final FileAttrs attrs;
-
+
public DirEntry(String filename, String longname, FileAttrs attrs) {
this.filename = filename;
this.longname = longname;
this.attrs = attrs;
}
}
-
+
/**
* Opaque representation of open file handle.
- * Note: open file handle can be used only with service instance that
+ * Note: open file handle can be used only with service instance that
* created the handle.
*/
interface IFileHandle {
IFileSystem getService();
}
-
+
/**
* Service specific error codes.
*/
static final int
-
+
/**
* Indicates end-of-file condition; for read() it means that no
* more data is available in the file, and for readdir() it
@@ -310,25 +310,25 @@ public interface IFileSystem extends IService {
* permissions to perform the operation.
*/
STATUS_PERMISSION_DENIED = 0x10003;
-
+
/**
- * The class to represent File System error reports.
+ * The class to represent File System error reports.
*/
@SuppressWarnings("serial")
abstract static class FileSystemException extends IOException {
-
+
protected FileSystemException(String message) {
super(message);
}
-
+
protected FileSystemException(Exception x) {
super(x.getMessage());
initCause(x);
}
-
+
/**
* Get error code. The code can be standard TCF error code or
- * one of service specific codes, see STATUS_*.
+ * one of service specific codes, see STATUS_*.
* @return error code.
*/
public abstract int getStatus();
@@ -336,7 +336,7 @@ public interface IFileSystem extends IService {
/**
* Open or create a file on a remote system.
- *
+ *
* @param file_name specifies the file name. See 'File Names' for more information.
* @param flags is a bit mask of TCF_O_* flags.
* @param attrs specifies the initial attributes for the file.
@@ -345,25 +345,25 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken open(String file_name, int flags, FileAttrs attrs, DoneOpen done);
-
+
interface DoneOpen {
void doneOpen(IToken token, FileSystemException error, IFileHandle handle);
}
-
+
/**
* Close a file on a remote system.
- *
+ *
* @param handle is a handle previously returned in the response to
* open() or opendir().
* @param done is call back object.
* @return pending command handle.
*/
IToken close(IFileHandle handle, DoneClose done);
-
+
interface DoneClose {
void doneClose(IToken token, FileSystemException error);
}
-
+
/**
* Read bytes from an open file.
* In response to this request, the server will read as many bytes as it
@@ -374,7 +374,7 @@ public interface IFileSystem extends IService {
* true in case of EOF. For normal disk files, it is guaranteed
* that this will read the specified number of bytes, or up to end of file
* or error. For e.g. device files this may return fewer bytes than requested.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start reading.
@@ -384,7 +384,7 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken read(IFileHandle handle, long offset, int len, DoneRead done);
-
+
interface DoneRead {
void doneRead(IToken token, FileSystemException error, byte[] data, boolean eof);
}
@@ -395,7 +395,7 @@ public interface IFileSystem extends IService {
* It is legal to write way beyond the end of the file; the semantics
* are to write zeroes from the end of the file to the specified offset
* and then the data.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start writing.
@@ -412,10 +412,10 @@ public interface IFileSystem extends IService {
interface DoneWrite {
void doneWrite(IToken token, FileSystemException error);
}
-
+
/**
* Retrieve file attributes.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
@@ -426,27 +426,27 @@ public interface IFileSystem extends IService {
/**
* Retrieve file attributes.
* Unlike 'stat()', 'lstat()' does not follow symbolic links.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
* @return pending command handle.
*/
IToken lstat(String path, DoneStat done);
-
+
/**
* Retrieve file attributes for an open file (identified by the file handle).
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param done is call back object.
* @return pending command handle.
*/
IToken fstat(IFileHandle handle, DoneStat done);
-
+
interface DoneStat {
void doneStat(IToken token, FileSystemException error, FileAttrs attrs);
}
-
+
/**
* Set file attributes.
* This request is used for operations such as changing the ownership,
@@ -454,7 +454,7 @@ public interface IFileSystem extends IService {
* An error will be returned if the specified file system object does
* not exist or the user does not have sufficient rights to modify the
* specified attributes.
- *
+ *
* @param path specifies the file system object (e.g. file or directory)
* whose attributes are to be modified.
* @param attrs specifies the modifications to be made to file attributes.
@@ -462,23 +462,23 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken setstat(String path, FileAttrs attrs, DoneSetStat done);
-
+
/**
* Set file attributes for an open file (identified by the file handle).
* This request is used for operations such as changing the ownership,
* permissions or access times, as well as for truncating a file.
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param attrs specifies the modifications to be made to file attributes.
* @param done is call back object.
* @return pending command handle.
*/
IToken fsetstat(IFileHandle handle, FileAttrs attrs, DoneSetStat done);
-
+
interface DoneSetStat {
void doneSetStat(IToken token, FileSystemException error);
}
-
+
/**
* The opendir() command opens a directory for reading.
* Once the directory has been successfully opened, files (and
@@ -492,7 +492,7 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken opendir(String path, DoneOpen done);
-
+
/**
* The files in a directory can be listed using the opendir() and
* readdir() requests. Each readdir() request returns one
@@ -508,21 +508,21 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken readdir(IFileHandle handle, DoneReadDir done);
-
+
interface DoneReadDir {
void doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof);
}
-
+
/**
* Create a directory on the server.
- *
+ *
* @param path - specifies the directory to be created.
* @param attrs - new directory attributes.
* @param done - result call back object.
* @return pending command handle.
*/
IToken mkdir(String path, FileAttrs attrs, DoneMkDir done);
-
+
interface DoneMkDir {
void doneMkDir(IToken token, FileSystemException error);
}
@@ -533,13 +533,13 @@ public interface IFileSystem extends IService {
* with the specified path exists, or if the specified directory is not
* empty, or if the path specified a file system object other than a
* directory.
- *
+ *
* @param path - specifies the directory to be removed.
* @param done - result call back object.
* @return pending command handle.
*/
IToken rmdir(String path, DoneRemove done);
-
+
interface DoneRemove {
void doneRemove(IToken token, FileSystemException error);
}
@@ -549,15 +549,15 @@ public interface IFileSystem extends IService {
* UNIX file system can report just one root with path "/". Other types of systems
* can have more the one root. For example, Windows server can return multiple roots:
* one per disc (e.g. "/C:/", "/D:/", etc.). Note: even Windows implementation of
- * the service must use forward slash as directory separator, and must start
+ * the service must use forward slash as directory separator, and must start
* absolute path with "/". Server should implement proper translation of
- * protocol file names to OS native names and back.
- *
+ * protocol file names to OS native names and back.
+ *
* @param done - result call back object.
* @return pending command handle.
*/
IToken roots(DoneRoots done);
-
+
interface DoneRoots {
void doneRoots(IToken token, FileSystemException error, DirEntry[] entries);
}
@@ -565,24 +565,24 @@ public interface IFileSystem extends IService {
/**
* Remove a file or symbolic link.
* This request cannot be used to remove directories.
- *
+ *
* @param file_name is the name of the file to be removed.
* @param done - result call back object.
* @return pending command handle.
*/
IToken remove(String file_name, DoneRemove done);
-
+
/**
* Canonicalize any given path name to an absolute path.
* This is useful for converting path names containing ".." components or
* relative pathnames without a leading slash into absolute paths.
- *
+ *
* @param path specifies the path name to be canonicalized.
* @param done - result call back object.
* @return pending command handle.
*/
IToken realpath(String path, DoneRealPath done);
-
+
interface DoneRealPath {
void doneRealPath(IToken token, FileSystemException error, String path);
}
@@ -593,48 +593,48 @@ public interface IFileSystem extends IService {
* with the name specified by 'new_path'. The server may also fail rename
* requests in other situations, for example if `old_path' and `new_path'
* point to different file systems on the server.
- *
+ *
* @param old_path is the name of an existing file or directory.
* @param new_path is the new name for the file or directory.
* @param done - result call back object.
* @return pending command handle.
*/
IToken rename(String old_path, String new_path, DoneRename done);
-
+
interface DoneRename {
void doneRename(IToken token, FileSystemException error);
}
/**
* Read the target of a symbolic link.
- *
+ *
* @param path specifies the path name of the symbolic link to be read.
* @param done - result call back object.
* @return pending command handle.
*/
IToken readlink(String path, DoneReadLink done);
-
+
interface DoneReadLink {
void doneReadLink(IToken token, FileSystemException error, String path);
}
/**
* Create a symbolic link on the server.
- *
+ *
* @param link_path specifies the path name of the symbolic link to be created.
* @param target_path specifies the target of the symbolic link.
* @param done - result call back object.
* @return pending command handle.
*/
IToken symlink(String link_path, String target_path, DoneSymLink done);
-
+
interface DoneSymLink {
void doneSymLink(IToken token, FileSystemException error);
}
/**
* Copy a file on remote system.
- *
+ *
* @param src_path specifies the path name of the file to be copied.
* @param dst_path specifies destination file name.
* @param copy_permissions - if true then copy source file permissions.
@@ -644,20 +644,20 @@ public interface IFileSystem extends IService {
*/
IToken copy(String src_path, String dst_path,
boolean copy_permissions, boolean copy_ownership, DoneCopy done);
-
+
interface DoneCopy {
void doneCopy(IToken token, FileSystemException error);
}
-
+
/**
- * Retrieve information about user account, which is used by server
+ * Retrieve information about user account, which is used by server
* to access file system on behalf of the client.
- *
+ *
* @param done - result call back object.
* @return pending command handle.
*/
IToken user(DoneUser done);
-
+
interface DoneUser {
void doneUser(IToken token, FileSystemException error,
int real_uid, int effective_uid, int real_gid, int effective_gid,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
index 4a4e11f81..b5492e806 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,15 +22,15 @@ import org.eclipse.tm.tcf.protocol.IToken;
public interface ILineNumbers extends IService {
static final String NAME = "LineNumbers";
-
+
/**
* TextArea represent a continues area in source text mapped to
* continues range of code addresses.
* Line and columns are counted starting from 1.
- * File name can be relative path, in such case client should
+ * File name can be relative path, in such case client should
* use TextArea directory name as origin for the path.
* File and directory names are valid on a host where code was compiled.
- * It is client responsibility to map names to this host file system.
+ * It is client responsibility to map names to this host file system.
*/
final class CodeArea {
public final String directory;
@@ -46,7 +46,7 @@ public interface ILineNumbers extends IService {
public final boolean basic_block;
public final boolean prologue_end;
public final boolean epilogue_begin;
-
+
public CodeArea(String directory, String file, int start_line, int start_column,
int end_line, int end_column, Number start_address, Number end_address, int isa,
boolean is_statement, boolean basic_block,
@@ -65,7 +65,7 @@ public interface ILineNumbers extends IService {
this.prologue_end = prologue_end;
this.epilogue_begin = epilogue_begin;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -90,14 +90,14 @@ public interface ILineNumbers extends IService {
if (directory == null && a.directory != null) return false;
return true;
}
-
+
@Override
public int hashCode() {
int h = 0;
if (file != null) h += file.hashCode();
return h + start_line + start_column + end_line + end_column;
}
-
+
@Override
public String toString() {
StringBuffer bf = new StringBuffer();
@@ -157,9 +157,9 @@ public interface ILineNumbers extends IService {
return bf.toString();
}
}
-
+
IToken mapToSource(String context_id, Number start_address, Number end_address, DoneMapToSource done);
-
+
interface DoneMapToSource {
void doneMapToSource(IToken token, Exception error, CodeArea[] areas);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
index 636a6288a..7b4759754 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* and is part of that protocol handler. Targets, known to other hosts, can be found through
* remote instances of ILocator service. Automatically discovered targets require no further
* configuration. Additional targets can be configured manually.
- *
+ *
* Clients should use Protocol.getLocator() to obtain local instance of ILocator,
* then ILocator.getPeers() can be used to get list of available peers (hosts and targets).
*/
@@ -36,7 +36,7 @@ public interface ILocator extends IService {
* Peer data retention period in milliseconds.
*/
static final long DATA_RETENTION_PERIOD = 60 * 1000;
-
+
/**
* Auto-configuration protocol version.
*/
@@ -56,38 +56,38 @@ public interface ILocator extends IService {
*/
String getName();
- /**
+ /**
* Get map (ID -> IPeer) of available peers (hosts and targets).
* The method return cached (currently known to the framework) list of peers.
* The list is updated according to event received from transport layer
*/
Map<String,IPeer> getPeers();
-
+
/**
* Redirect this service channel to given peer using this service as a proxy.
* @param peer_id - Peer ID.
*/
IToken redirect(String peer_id, DoneRedirect done);
-
+
interface DoneRedirect {
void doneRedirect(IToken token, Exception error);
}
-
+
/**
* Call back after TCF messages sent to this target up to this moment are delivered.
* This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
- *
+ *
* This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
*/
IToken sync(DoneSync done);
-
+
interface DoneSync {
void doneSync(IToken token);
}
@@ -120,7 +120,7 @@ public interface ILocator extends IService {
* @param id - peer ID
*/
void peerRemoved(String id);
-
+
/**
* Peer heart beat detected.
* @param id - peer ID
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
index a77941d5c..794877bbe 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -37,7 +37,7 @@ public interface IMemory extends IService {
PROP_START_BOUND = "StartBound", /** Number, lowest address (inclusive) which is valid for the context */
PROP_END_BOUND = "EndBound", /** Number, highest address (inclusive) which is valid for the context */
PROP_ACCESS_TYPES = "AccessTypes"; /** Array of String, the access types allowed for this context */
-
+
/**
* Values of "AccessTypes".
* Target system can support multiple different memory access types, like instruction and data access.
@@ -58,11 +58,11 @@ public interface IMemory extends IService {
ACCESS_PHYSICAL = "physical", /** Context uses physical addresses */
ACCESS_CACHE = "cache", /** Context is a cache */
ACCESS_TLB = "tlb"; /** Context is a TLB memory */
-
+
/**
* Retrieve context info for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
*/
@@ -89,7 +89,7 @@ public interface IMemory extends IService {
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -126,62 +126,62 @@ public interface IMemory extends IService {
interface MemoryContext {
- /**
+ /**
* Get context ID.
* @return context ID.
*/
String getID();
- /**
+ /**
* Get parent context ID.
* @return parent ID.
*/
String getParentID();
-
+
/**
* Get process ID, if applicable.
* @return process ID.
*/
String getProcessID();
-
+
/**
* Get memory endianess.
* @return true if memory id big-endian.
*/
boolean isBigEndian();
-
+
/**
* Get memory address size.
* @return number of bytes used to store memory address value.
*/
int getAddressSize();
-
+
/**
* Get memory context name.
* The name can be used for UI purposes.
* @return context name.
*/
String getName();
-
+
/**
* Get lowest address (inclusive) which is valid for the context.
* @return lowest address.
*/
Number getStartBound();
-
+
/**
* Get highest address (inclusive) which is valid for the context.
* @return highest address.
*/
Number getEndBound();
-
+
/**
* Get the access types allowed for this context.
* @return collection of access type names.
*/
Collection<String> getAccessTypes();
- /**
+ /**
* Get context properties.
* @return all available context properties.
*/
@@ -218,7 +218,7 @@ public interface IMemory extends IService {
class MemoryError extends Exception {
private static final long serialVersionUID = 1L;
-
+
public MemoryError(String msg) {
super(msg);
}
@@ -238,7 +238,7 @@ public interface IMemory extends IService {
interface ErrorOffset {
// Error may have per byte information
- final static int
+ final static int
BYTE_VALID = 0x00,
BYTE_UNKNOWN = 0x01, // e.g. out of range
BYTE_INVALID = 0x02,
@@ -270,7 +270,7 @@ public interface IMemory extends IService {
/**
* Memory event listener is notified when memory context hierarchy
- * changes, and when memory is modified by memory service commands.
+ * changes, and when memory is modified by memory service commands.
*/
interface MemoryListener {
@@ -290,7 +290,7 @@ public interface IMemory extends IService {
void contextRemoved(String[] context_ids);
/**
- * Called when target memory content was changed and clients
+ * Called when target memory content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached memory data.
* Not every change is notified - it is not possible,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
index bf9b49fc1..33562f6c7 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,20 +18,20 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
- * IProcesses service provides access to the target OS's process
+ * IProcesses service provides access to the target OS's process
* information, allows to start and terminate a process, and allows
* to attach and detach a process for debugging. Debug services,
* like IMemory and IRunControl, require a process to be attached
* before they can access it.
- *
- * If a process is started by this service, its standard input/output streams are
+ *
+ * If a process is started by this service, its standard input/output streams are
* available for client to read/write using Streams service. Stream type of such
* streams is set to "Processes".
*/
public interface IProcesses extends IService {
static final String NAME = "Processes";
-
+
/**
* Retrieve context info for given context ID.
* A context corresponds to an execution thread, process, address space, etc.
@@ -41,8 +41,8 @@ public interface IProcesses extends IService {
* However, 'Processes.getContext' is supposed to return only process specific data,
* If the ID is not a process ID, 'IProcesses.getContext' may not return any
* useful information
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -61,10 +61,10 @@ public interface IProcesses extends IService {
/**
* Retrieve children of given context.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* @param attached_only - if true return only attached process IDs.
* @param done - call back interface called when operation is completed.
*/
@@ -81,38 +81,38 @@ public interface IProcesses extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* Context property names.
*/
static final String
/** The TCF context ID */
PROP_ID = "ID",
-
+
/** The TCF parent context ID */
PROP_PARENTID = "ParentID",
-
+
/** Is the context attached */
PROP_ATTACHED = "Attached",
-
+
/** Can terminate the context */
PROP_CAN_TERMINATE = "CanTerminate",
-
+
/** Process name. Client UI can show this name to a user */
PROP_NAME = "Name",
-
+
/** Process standard input stream ID */
PROP_STDIN_ID = "StdInID",
-
+
/** Process standard output stream ID */
PROP_STDOUT_ID = "StdOutID",
-
+
/** Process standard error stream ID */
PROP_STDERR_ID = "StdErrID";
-
+
interface ProcessContext {
-
- /**
+
+ /**
* Get context ID.
* Same as getProperties().get(“ID”)
*/
@@ -149,7 +149,7 @@ public interface IProcesses extends IService {
* @return Map 'property name' -> 'property value'
*/
Map<String, Object> getProperties();
-
+
/**
* Attach debugger to a process.
* Services like IRunControl, IMemory, IBreakpoints work only with attached processes.
@@ -165,38 +165,38 @@ public interface IProcesses extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken detach(DoneCommand done);
-
+
/**
- * Terminate a process.
+ * Terminate a process.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
*/
IToken terminate(DoneCommand done);
}
-
+
/**
* Call-back interface to be called when command is complete.
*/
interface DoneCommand {
void doneCommand(IToken token, Exception error);
}
-
+
/**
* Signal property names used by "getSignalList" command.
*/
static final String
/** Number, bit position in the signal mask */
SIG_INDEX = "Index",
-
+
/** String, signal name, for example "SIGHUP" */
SIG_NAME = "Name",
-
+
/** Number, signal code, as defined by OS */
SIG_CODE = "Code",
-
+
/** String, human readable description of the signal */
SIG_DESCRIPTION = "Description";
-
+
/**
* Get list of signals that can be send to the process.
* @param context_id - process context ID or null.
@@ -211,17 +211,17 @@ public interface IProcesses extends IService {
interface DoneGetSignalList {
void doneGetSignalList(IToken token, Exception error, Collection<Map<String,Object>> list);
}
-
+
/**
* Get process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
* When new context is created it inherits the mask from its parent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
*/
IToken getSignalMask(String context_id, DoneGetSignalMask done);
-
+
/**
* Call-back interface to be called when "getSignalMask" command is complete.
*/
@@ -235,13 +235,13 @@ public interface IProcesses extends IService {
*/
void doneGetSignalMask(IToken token, Exception error, int dont_stop, int dont_pass, int pending);
}
-
+
/**
- * Set process or thread signal mask.
+ * Set process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* @param dont_stop - bit-set of signals that should not suspend execution of the context.
- * By default, debugger suspends a context before it receives a signal.
+ * By default, debugger suspends a context before it receives a signal.
* @param dont_pass - bit-set of signals that should not be delivered to the context.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
@@ -263,7 +263,7 @@ public interface IProcesses extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken getEnvironment(DoneGetEnvironment done);
-
+
/**
* Call-back interface to be called when "getEnvironment" command is complete.
*/
@@ -277,7 +277,7 @@ public interface IProcesses extends IService {
* @param file - process image file.
* @param command_line - command line arguments for the process.
* @param environment - map of environment variables for the process,
- * if null then default set of environment variables will be used.
+ * if null then default set of environment variables will be used.
* @param attach - if true debugger should be attached to the process.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
@@ -285,14 +285,14 @@ public interface IProcesses extends IService {
IToken start(String directory, String file,
String[] command_line, Map<String,String> environment,
boolean attach, DoneStart done);
-
+
/**
* Call-back interface to be called when "start" command is complete.
*/
interface DoneStart {
void doneStart(IToken token, Exception error, ProcessContext process);
}
-
+
/**
* Add processes service event listener.
* @param listener - event listener implementation.
@@ -307,10 +307,10 @@ public interface IProcesses extends IService {
/**
* Process event listener is notified when a process exits.
- * Event are reported only for processes that were started by 'start' command.
+ * Event are reported only for processes that were started by 'start' command.
*/
interface ProcessesListener {
-
+
/**
* Called when a process exits.
* @param process_id - process context ID
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
index 1e0abee4c..9ed2e05d2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -43,14 +43,14 @@ public interface IRegisters extends IService {
PROP_FLOAT = "Float", /** Boolean, true if the register value is a floating-point value */
PROP_BIG_ENDIAN = "BigEndian", /** Boolean, true if big endian */
PROP_LEFT_TO_RIGHT = "LeftToRight", /** Boolean, true if the lowest numbered bit should be shown to user as the left-most bit */
- PROP_FIST_BIT = "FirstBit", /** Number, bit numbering base (0 or 1) to use when showing bits to user */
+ PROP_FIST_BIT = "FirstBit", /** Number, bit numbering base (0 or 1) to use when showing bits to user */
PROP_BITS = "Bits", /** Number, if context is a bit field, contains the field bit numbers in the parent context */
PROP_VALUES = "Values", /** Array of Map, predefined names (mnemonics) for some of context values */
PROP_MEMORY_ADDRESS = "MemoryAddress", /** Number, the address of a memory mapped register */
PROP_MEMORY_CONTEXT = "MemoryContext", /** String, the context ID of a memory context in which a memory mapped register is located */
PROP_CAN_SEARCH = "CanSearch", /** Array of String, a list of attribute names which can be searched for starting on this context */
PROP_ROLE = "Role"; /** String, the role the register plays in a program execution */
-
+
/**
* Values of context property "Role".
*/
@@ -60,18 +60,18 @@ public interface IRegisters extends IService {
ROLE_FP = "FP", /** Register defining the current frame pointer location */
ROLE_RET = "RET", /** Register used to store the return address for calls */
ROLE_CORE = "CORE"; /** Indicates register or register groups which belong to the core state */
-
+
/**
* Search filter properties.
*/
static final String
SEARCH_NAME = "Name", /** The name of the property this filter applies too */
SEARCH_EQUAL_VALUE = "EqualValue"; /** The value which is searched for */
-
+
/**
* Retrieve context info for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -98,7 +98,7 @@ public interface IRegisters extends IService {
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -118,9 +118,9 @@ public interface IRegisters extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
- * RegistersContext objects represent register groups, registers and bit fields.
+ * RegistersContext objects represent register groups, registers and bit fields.
*/
interface RegistersContext {
/**
@@ -128,31 +128,31 @@ public interface IRegisters extends IService {
* @return context ID.
*/
String getID();
-
+
/**
* Get parent context ID.
* @return parent context ID.
*/
String getParentID();
-
+
/**
* Get process ID, if applicable.
* @return process ID.
*/
String getProcessID();
-
+
/**
* Get context (register, register group, bit field) name.
* @return context name.
*/
String getName();
-
+
/**
* Get context description.
* @return context description.
*/
String getDescription();
-
+
/**
* Get context size in bytes.
* Byte arrays in get()/set() methods should be same size.
@@ -162,58 +162,58 @@ public interface IRegisters extends IService {
* @return context size in bytes.
*/
int getSize();
-
+
/**
* Check if context value can be read.
* @return true if can read value of the context.
*/
boolean isReadable();
-
+
/**
* Check if reading the context (register) destroys its current value -
* it can be read only once.
* @return true if read-once register.
*/
boolean isReadOnce();
-
+
/**
* Check if context value can be written.
* @return true if can write value of the context.
*/
boolean isWriteable();
-
+
/**
* Check if register value can not be overwritten - every write counts.
* @return true if write-once register.
*/
boolean isWriteOnce();
-
+
/**
- * Check if writing the context can change values of other registers.
+ * Check if writing the context can change values of other registers.
* @return true if has side effects.
*/
boolean hasSideEffects();
-
+
/**
* Check if the register value can change even when target is stopped.
* @return true if the register value can change at any time.
*/
boolean isVolatile();
-
+
/**
* Check if the register value is a floating-point value.
* @return true if a floating-point register.
*/
boolean isFloat();
-
+
/**
* Check endianess of the context.
- * Big endian means decreasing numeric significance with increasing bit number.
+ * Big endian means decreasing numeric significance with increasing bit number.
* The endianess is used to encode and decode values of get, getm, set and setm commands.
* @return true if big endian.
*/
boolean isBigEndian();
-
+
/**
* Check if the lowest numbered bit (i.e. bit #0 or bit #1 depending on
* getFirstBitNumber() value) should be shown to user as the left-most bit or
@@ -221,45 +221,45 @@ public interface IRegisters extends IService {
* @return true if the first bit is left-most bit.
*/
boolean isLeftToRight();
-
+
/**
* If the context has bit field children, bit positions of the fields
* can be zero-based or 1-based.
* @return first bit position - 0 or 1.
*/
int getFirstBitNumber();
-
+
/**
- * If context is a bit field, get the field bit numbers in parent context.
+ * If context is a bit field, get the field bit numbers in parent context.
* @return array of bit numbers.
*/
int[] getBitNumbers();
-
+
/**
* A context can have predefined names (mnemonics) for some its values.
* This method returns a list of such named values.
* @return array of named values or null.
*/
NamedValue[] getNamedValues();
-
+
/**
* Get the address of a memory mapped register.
* @return address.
*/
Number getMemoryAddress();
-
+
/**
- * Get the context ID of a memory context in which a memory mapped register is located.
+ * Get the context ID of a memory context in which a memory mapped register is located.
* @return memory context ID.
*/
String getMemoryContext();
-
+
/**
* Get a list of property names which can be searched for starting on this context
* @return collection of property names.
*/
Collection<String> canSearch();
-
+
/**
* Get the role the register plays in a program execution.
* @return role name.
@@ -271,14 +271,14 @@ public interface IRegisters extends IService {
* @return map of all available context properties.
*/
Map<String,Object> getProperties();
-
+
/**
* Read value of the context.
* @param done - call back object.
* @return - pending command handle.
*/
IToken get(DoneGet done);
-
+
/**
* Set value of the context.
* @param value - value to write into the context.
@@ -286,7 +286,7 @@ public interface IRegisters extends IService {
* @return - pending command handle.
*/
IToken set(byte[] value, DoneSet done);
-
+
/**
* Search register contexts that passes given search filter.
* Search is only supported for properties listed in the "CanSearch" property.
@@ -296,10 +296,10 @@ public interface IRegisters extends IService {
*/
IToken search(Map<String,Object> filter, DoneSearch done);
}
-
+
/**
* A register context can have predefined names (mnemonics) for some its values.
- * NamedValue objects represent such values.
+ * NamedValue objects represent such values.
*/
interface NamedValue {
/**
@@ -307,20 +307,20 @@ public interface IRegisters extends IService {
* @return the value as an array of bytes.
*/
byte[] getValue();
-
+
/**
* Get name (mnemonic) of the value.
* @return value name.
*/
String getName();
-
+
/**
* Get human readable description of the value.
* @return value description.
*/
String getDescription();
}
-
+
/**
* Read values of multiple locations in registers.
* @param locs - array of data locations.
@@ -328,7 +328,7 @@ public interface IRegisters extends IService {
* @return - pending command handle.
*/
IToken getm(Location[] locs, DoneGet done);
-
+
/**
* Set values of multiple locations in registers.
* @param locs - array of data locations.
@@ -343,7 +343,7 @@ public interface IRegisters extends IService {
*/
final class Location {
/** Register context ID */
- public final String id;
+ public final String id;
/** offset in the context, in bytes */
public final int offs;
@@ -370,7 +370,7 @@ public interface IRegisters extends IService {
*/
void doneGet(IToken token, Exception error, byte[] value);
}
-
+
/**
* 'set' command call back interface.
*/
@@ -382,7 +382,7 @@ public interface IRegisters extends IService {
*/
void doneSet(IToken token, Exception error);
}
-
+
/**
* 'search' command call back interface.
*/
@@ -410,7 +410,7 @@ public interface IRegisters extends IService {
/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/
interface RegistersListener {
@@ -419,12 +419,12 @@ public interface IRegisters extends IService {
* Most targets have static set of registers and register properties.
* Such targets never generate this event. However, some targets,
* for example, JTAG probes, allow user to modify register definitions.
- * Clients should flush all cached register context data.
+ * Clients should flush all cached register context data.
*/
void contextChanged();
/**
- * Called when register content was changed and clients
+ * Called when register content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached registers data.
* Not every change is notified - it is not possible,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
index ccfcc75df..54dc16241 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
public interface IRunControl extends IService {
static final String NAME = "RunControl";
-
+
/**
* Context property names.
*/
@@ -33,70 +33,70 @@ public interface IRunControl extends IService {
PROP_CAN_COUNT = "CanCount",
PROP_CAN_SUSPEND = "CanSuspend",
PROP_CAN_TERMINATE = "CanTerminate";
-
+
/**
- * Context resume modes.
+ * Context resume modes.
*/
static final int
-
+
RM_RESUME = 0,
-
+
/**
* Step over a single instruction.
* If the instruction is a function call then don't stop until the function returns.
*/
RM_STEP_OVER = 1,
-
+
/**
* Step a single instruction.
* If the instruction is a function call then stop at first instruction of the function.
*/
RM_STEP_INTO = 2,
-
+
/**
* Step over a single source code line.
* If the line contains a function call then don't stop until the function returns.
*/
RM_STEP_OVER_LINE = 3,
-
+
/**
* Step a single source code line.
* If the line contains a function call then stop at first line of the function.
*/
RM_STEP_INTO_LINE = 4,
-
+
/**
* Run until control returns from current function.
*/
RM_STEP_OUT = 5,
-
+
/**
* Start running backwards.
* Execution will continue until suspended by command or breakpoint.
*/
RM_REVERSE_RESUME = 6,
-
+
/**
* Reverse of RM_STEP_OVER - run backwards over a single instruction.
* If the instruction is a function call then don't stop until get out of the function.
*/
RM_REVERSE_STEP_OVER = 7,
-
+
/**
* Reverse of RM_STEP_INTO.
* This effectively "un-executes" the previous instruction
*/
RM_REVERSE_STEP_INTO = 8,
-
+
/**
* Reverse of RM_STEP_OVER_LINE.
* Resume backward execution of given context until control reaches an instruction that belongs
- * to a different source line.
+ * to a different source line.
* If the line contains a function call then don't stop until get out of the function.
* Error is returned if line number information not available.
*/
RM_REVERSE_STEP_OVER_LINE = 9,
-
+
/**
* Reverse of RM_STEP_INTO_LINE,
* Resume backward execution of given context until control reaches an instruction that belongs
@@ -105,38 +105,38 @@ public interface IRunControl extends IService {
* Error is returned if line number information not available.
*/
RM_REVERSE_STEP_INTO_LINE = 10,
-
+
/**
* Reverse of RM_STEP_OUT.
* Resume backward execution of the given context until control reaches the point where the current function was called.
*/
RM_REVERSE_STEP_OUT = 11,
-
+
/**
* Step over instructions until PC is outside the specified range.
* If any function call within the range is considered to be in range.
*/
RM_STEP_OVER_RANGE = 12,
-
+
/**
* Step instruction until PC is outside the specified range for any reason.
*/
RM_STEP_INTO_RANGE = 13,
-
+
/**
* Reverse of RM_STEP_OVER_RANGE
*/
RM_REVERSE_STEP_OVER_RANGE = 14,
-
+
/**
* Reverse of RM_STEP_INTO_RANGE
*/
RM_REVERSE_STEP_INTO_RANGE = 15;
-
+
/**
* State change reason of a context.
* Reason can be any text, but if it is one of predefined strings,
- * a generic client might be able to handle it better.
+ * a generic client might be able to handle it better.
*/
static final String
REASON_USER_REQUEST = "Suspended",
@@ -148,11 +148,11 @@ public interface IRunControl extends IService {
REASON_SIGNAL = "Signal",
REASON_SHAREDLIB = "Shared Library",
REASON_ERROR = "Error";
-
+
/**
* Retrieve context properties for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - callback interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -171,10 +171,10 @@ public interface IRunControl extends IService {
/**
* Retrieve children of given context.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* @param done - callback interface called when operation is completed.
*/
IToken getChildren(String parent_context_id, DoneGetChildren done);
@@ -190,7 +190,7 @@ public interface IRunControl extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* A context corresponds to an execution thread, process, address space, etc.
* A context can belong to a parent context. Contexts hierarchy can be simple
@@ -198,17 +198,17 @@ public interface IRunControl extends IService {
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/
interface RunControlContext {
- /**
+ /**
* Retrieve context ID.
* Same as getProperties().get(“ID”)
*/
String getID();
- /**
+ /**
* Retrieve parent context ID.
* Same as getProperties().get(“ParentID”)
*/
@@ -227,14 +227,14 @@ public interface IRunControl extends IService {
* @return value of PROP_IS_CONTAINER.
*/
boolean isContainer();
-
+
/**
* Utility method to read context property PROP_HAS_STATE.
- * Only context that has a state can be resumed or suspended.
+ * Only context that has a state can be resumed or suspended.
* @return value of PROP_HAS_STATE.
*/
boolean hasState();
-
+
/**
* Utility method to read context property PROP_CAN_SUSPEND.
* Value 'true' means suspend command is supported by the context,
@@ -244,29 +244,29 @@ public interface IRunControl extends IService {
* @return value of PROP_CAN_SUSPEND.
*/
boolean canSuspend();
-
+
/**
* Utility method to read a 'mode' bit in context property PROP_CAN_RESUME.
* Value 'true' means resume command is supported by the context,
* however the method does not check that the command can be executed successfully in
* the current state of the context. For example, the command still can fail if context is
* already resumed.
- * @param mode - resume mode, see RM_*.
- * @return value of requested bit of PROP_CAN_RESUME.
+ * @param mode - resume mode, see RM_*.
+ * @return value of requested bit of PROP_CAN_RESUME.
*/
boolean canResume(int mode);
-
+
/**
* Utility method to read a 'mode' bit in context property PROP_CAN_COUNT.
* Value 'true' means resume command with count other then 1 is supported by the context,
* however the method does not check that the command can be executed successfully in
* the current state of the context. For example, the command still can fail if context is
* already resumed.
- * @param mode - resume mode, see RM_*.
- * @return value of requested bit of PROP_CAN_COUNT.
+ * @param mode - resume mode, see RM_*.
+ * @return value of requested bit of PROP_CAN_COUNT.
*/
boolean canCount(int mode);
-
+
/**
* Utility method to read context property PROP_CAN_TERMINATE.
* Value 'true' means terminate command is supported by the context,
@@ -291,7 +291,7 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken suspend(DoneCommand done);
-
+
/**
* Send a command to resume a context.
* Also resumes children if context is a container.
@@ -301,7 +301,7 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken resume(int mode, int count, DoneCommand done);
-
+
/**
* Send a command to resume a context.
* Also resumes children if context is a container.
@@ -312,7 +312,7 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken resume(int mode, int count, Map<String,Object> params, DoneCommand done);
-
+
/**
* Send a command to terminate a context.
* @param done - command result call back object.
@@ -345,7 +345,7 @@ public interface IRunControl extends IService {
* @param listener - run control event listener to add.
*/
void addListener(RunControlListener listener);
-
+
/**
* Remove run control event listener.
* @param listener - run control event listener to remove.
@@ -394,14 +394,14 @@ public interface IRunControl extends IService {
/**
* Called when target simultaneously suspends multiple threads in a container
* (process, core, etc.).
- *
+ *
* @param context - ID of a context responsible for the event. It can be container ID or
* any one of container children, for example, it can be thread that hit "suspend all" breakpoint.
* Client expected to move focus (selection) to this context.
* @param pc - program counter of the context.
* @param reason - human readable description of suspend reason.
* @param params - additional target specific data about suspended context.
- * @param suspended_ids - full list of all contexts that were suspended.
+ * @param suspended_ids - full list of all contexts that were suspended.
*/
void containerSuspended(String context, String pc,
String reason, Map<String,Object> params, String[] suspended_ids);
@@ -409,8 +409,8 @@ public interface IRunControl extends IService {
/**
* Called when target simultaneously resumes multiple threads in a container (process,
* core, etc.).
- *
- * @param context_ids - full list of all contexts that were resumed.
+ *
+ * @param context_ids - full list of all contexts that were resumed.
*/
void containerResumed(String[] context_ids);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
index cba5b560c..f86e61db1 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,17 +30,17 @@ public interface IStackTrace extends IService {
PROP_NAME = "Name",
PROP_FRAME_ADDRESS = "FP",
PROP_RETURN_ADDRESS = "RP",
- PROP_INSTRUCTION_ADDRESS = "IP",
+ PROP_INSTRUCTION_ADDRESS = "IP",
PROP_ARGUMENTS_COUNT = "ArgsCnt",
PROP_ARGUMENTS_ADDRESS = "ArgsAddr";
/**
* Retrieve context info for given context IDs.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
- * @param id – array of context IDs.
+ *
+ * @param id – array of context IDs.
* @param done - call back interface called when operation is completed.
*/
IToken getContext(String[] id, DoneGetContext done);
@@ -63,10 +63,10 @@ public interface IStackTrace extends IService {
* Some targets have more then one stack. In such case children of a thread
* are stacks, and stack frames are deeper in the hierarchy - they can be
* retrieved with additional getChildren commands.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
+ *
* @param parent_context_id – parent context ID.
* @param done - call back interface called when operation is completed.
*/
@@ -84,43 +84,43 @@ public interface IStackTrace extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
- * StackTraceContext represents stack trace objects - stacks and stack frames.
+ * StackTraceContext represents stack trace objects - stacks and stack frames.
*/
interface StackTraceContext {
-
+
/**
* Get Context ID.
* @return context ID.
*/
String getID();
-
+
/**
* Get parent context ID.
* @return parent context ID.
*/
String getParentID();
-
+
/**
* Get context name - if context represents a stack.
* @return context name or null.
*/
String getName();
-
+
/**
* Get memory address of this frame.
* @return address or null if not a stack frame.
*/
Number getFrameAddress();
-
+
/**
* Get program counter saved in this stack frame -
* it is address of instruction to be executed when the function returns.
* @return return address or null if not a stack frame.
*/
Number getReturnAddress();
-
+
/**
* Get address of the next instruction to be executed in this stack frame.
* For top frame it is same as PC register value.
@@ -128,19 +128,19 @@ public interface IStackTrace extends IService {
* @return instruction address or null if not a stack frame.
*/
Number getInstructionAddress();
-
+
/**
* Get number of function arguments for this frame.
* @return function arguments count.
*/
int getArgumentsCount();
-
+
/**
* Get address of function arguments area in memory.
* @return function arguments address or null if not available.
*/
Number getArgumentsAddress();
-
+
/**
* Get complete map of context properties.
* @return map of context properties.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
index 9867f420b..c964d6d62 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,13 +15,13 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
* Streams service is a generic interface to support streaming of data between host and remote agents.
- *
+ *
* The service supports:
* 1. Asynchronous overlapped data streaming: multiple 'read' or 'write' command can be issued at same time, both peers
* can continue data processing concurrently with data transmission.
* 2. Multicast: multiple clients can receive data from same stream.
* 3. Subscription model: clients are required to expressed interest in particular streams by subscribing for the service.
- * 4. Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
+ * 4. Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
*/
public interface IStreams extends IService {
@@ -32,8 +32,8 @@ public interface IStreams extends IService {
/**
* Clients can implement StreamsListener interface to be notified
- * when a stream is created or disposed. The interface is registered with 'subscribe' command.
- *
+ * when a stream is created or disposed. The interface is registered with 'subscribe' command.
+ *
* When new stream is created, client must decide if it is interested in that particular stream instance.
* If not interested, client should send 'disconnect' command to allow remote peer to free resources and bandwidth.
* If not disconnected, client is required to send 'read' commands as necessary to prevent stream buffer overflow.
@@ -41,7 +41,7 @@ public interface IStreams extends IService {
interface StreamsListener {
/**
- * Called when a new stream is created.
+ * Called when a new stream is created.
* @param stream_type - source type of the stream.
* @param stream_id - ID of the stream.
* @param context_id - a context ID that is associated with the stream, or null.
@@ -51,7 +51,7 @@ public interface IStreams extends IService {
void created(String stream_type, String stream_id, String context_id);
/**
- * Called when a stream is disposed.
+ * Called when a stream is disposed.
* @param stream_type - source type of the stream.
* @param stream_id - ID of the stream.
*/
@@ -118,7 +118,7 @@ public interface IStreams extends IService {
* @param lost_size - number of bytes that were lost because of buffer overflow.
* 'lost_size' -1 means unknown number of bytes were lost.
* if both 'lost_size' and 'data.length' are non-zero then lost bytes are considered
- * located right before read bytes.
+ * located right before read bytes.
* @param data - bytes read from the stream.
* @param eos - true if end of stream was reached.
*/
@@ -153,7 +153,7 @@ public interface IStreams extends IService {
}
/**
- * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
+ * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
* @param stream_id - ID of the stream.
* @param done - command result call back object.
* @return - pending command handle.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
index 0a6d24a7d..ef3f3dd35 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ public interface ISymbols extends IService {
* Service name.
*/
static final String NAME = "Symbols";
-
+
enum SymbolClass {
unknown, // unknown symbol class
value, // constant value
@@ -29,7 +29,7 @@ public interface ISymbols extends IService {
function, // function body
type // a type
}
-
+
enum TypeClass {
unknown, // unknown type class
cardinal, // unsigned integer
@@ -41,7 +41,7 @@ public interface ISymbols extends IService {
enumeration, // enumeration type.
function // function type.
}
-
+
/**
* Symbol context interface.
*/
@@ -51,38 +51,38 @@ public interface ISymbols extends IService {
* @return symbol ID.
*/
String getID();
-
+
/**
* Get execution context ID (thread or process) that owns this instance of a symbol.
* @return execution context ID.
*/
String getExeContextID();
-
+
/**
* Get symbol name.
* @return symbol name or null.
*/
String getName();
-
+
/**
* Get symbol class.
* @return symbol class.
*/
SymbolClass getSymbolClass();
-
+
/**
* Get symbol type class.
* @return type class.
*/
TypeClass getTypeClass();
-
+
/**
* Get type ID.
- * If the symbol is a type and not a 'typedef', return same as getID().
+ * If the symbol is a type and not a 'typedef', return same as getID().
* @return type ID.
*/
String getTypeID();
-
+
/**
* Get base type ID.
* If this symbol is a
@@ -90,46 +90,46 @@ public interface ISymbols extends IService {
* array type - return element type;
* function type - return function result type;
* class type - return base class;
- * otherwise return null.
+ * otherwise return null.
* @return type ID.
*/
String getBaseTypeID();
-
+
/**
* Get index type ID.
* If this symbol is a
* array type - return array index type;
- * otherwise return null.
+ * otherwise return null.
* @return type ID.
*/
String getIndexTypeID();
-
+
/**
* Return value size of the symbol (or type).
* @return size in bytes.
*/
int getSize();
-
+
/**
- * If symbol is an array type - return number of elements.
+ * If symbol is an array type - return number of elements.
* @return number of elements.
*/
int getLength();
-
+
/**
* Return offset from 'this' for member of class, struct or union.
* @return offset in bytes.
*/
int getOffset();
-
+
/**
* Return address of the symbol.
* @return address or null.
*/
Number getAddress();
-
+
/**
- * If symbol is a constant object, return its value.
+ * If symbol is a constant object, return its value.
* @return symbol value as array of bytes.
*/
byte[] getValue();
@@ -162,8 +162,8 @@ public interface ISymbols extends IService {
/**
* Retrieve symbol context info for given symbol ID.
* @see Symbol
- *
- * @param id – symbol context ID.
+ *
+ * @param id – symbol context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
*/
@@ -185,9 +185,9 @@ public interface ISymbols extends IService {
/**
* Retrieve children IDs for given parent ID.
* Meaning of the operation depends on parent kind:
- * 1. struct, union, or class type - get fields;
+ * 1. struct, union, or class type - get fields;
* 2. enumeration type - get enumerators;
- *
+ *
* @param parent_context_id – parent symbol context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
index cd54d76ac..dba112819 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
- * This is optional service that can be implemented by a peer.
+ * This is optional service that can be implemented by a peer.
* If implemented, the service can be used for monitoring system activity and utilization.
* It provides list of running processes, different process attributes like command line, environment, etc.,
* and some resource utilization data. The service can be used by a client to provide functionality
@@ -29,8 +29,8 @@ public interface ISysMonitor extends IService {
/**
* Retrieve context info for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - callback interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -49,10 +49,10 @@ public interface ISysMonitor extends IService {
/**
* Retrieve children of given context.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* @param done - callback interface called when operation is completed.
*/
IToken getChildren(String parent_context_id, DoneGetChildren done);
@@ -68,167 +68,167 @@ public interface ISysMonitor extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* Context property names.
*/
static final String
/** The TCF context ID */
PROP_ID = "ID",
-
+
/** The TCF parent context ID */
PROP_PARENTID = "ParentID",
-
+
/** Current working directory of the process */
PROP_CWD = "CWD",
-
+
/** The process's root directory (as set by chroot) */
PROP_ROOT = "Root",
-
+
/** User ID of the process owner */
PROP_UID = "UID",
-
+
/** Group ID of the process owner */
PROP_UGID = "UGID",
-
+
/** User name of the process owner */
PROP_USERNAME = "UserName",
-
+
/** Group name of the process owner */
PROP_GROUPNAME = "GroupName",
-
+
/** System process ID */
PROP_PID = "PID",
-
+
/** Executable file of the process */
PROP_FILE = "File",
-
+
/** One character from the string "RSDZTW" where R is running, S is
* sleeping in an interruptible wait, D is waiting in uninterruptible
* disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
* is paging.*/
PROP_STATE = "State",
-
+
/** System ID of the parent process */
PROP_PPID = "PPID",
-
+
/** The process group ID of the process */
PROP_PGRP = "PGRP",
-
+
/** The session ID of the process */
PROP_SESSION = "Session",
-
+
/** The tty the process uses */
PROP_TTY = "TTY",
-
+
/** The process group ID of the process which currently owns the tty that
* the process is connected to. */
PROP_TGID = "TGID",
-
+
/** ID of a process that has attached this process for tracing or debugging */
PROP_TRACERPID = "TracerPID",
-
+
/** The kernel flags word of the process. Details depend on the kernel */
PROP_FLAGS = "Flags",
-
+
/** The number of minor faults the process has made which have not
* required loading a memory page from disk */
PROP_MINFLT = "MinFlt",
-
+
/** The number of minor faults that the process's waited-for children have made */
- PROP_CMINFLT = "CMinFlt",
-
+ PROP_CMINFLT = "CMinFlt",
+
/** The number of major faults the process has made which have required
* loading a memory page from disk */
PROP_MAJFLT = "MajFlt",
-
+
/** The number of major faults that the process's waited-for children
* have made */
PROP_CMAJFLT = "CMajFlt",
-
+
/** The number of milliseconds that this process has been scheduled in user mode */
PROP_UTIME = "UTime",
-
+
/** The number of milliseconds that this process has been scheduled in kernel mode */
PROP_STIME = "STime",
-
+
/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */
PROP_CUTIME = "CUTime",
-
+
/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */
PROP_CSTIME = "CSTime",
-
+
/** The standard nice value */
PROP_PRIORITY = "Priority",
-
+
/** The nice value */
PROP_NICE = "Nice",
-
+
/** The time in milliseconds before the next SIGALRM is sent to the process
* due to an interval timer */
PROP_ITREALVALUE = "ITRealValue",
-
+
/** The time in milliseconds the process started after system boot */
PROP_STARTTIME = "StartTime",
-
+
/** Virtual memory size in bytes */
PROP_VSIZE = "VSize",
-
+
/** Memory pages size in bytes */
PROP_PSIZE = "PSize",
-
+
/** Resident Set Size: number of pages the process has in real memory,
* minus used for administrative purposes. This is just the pages which
* count towards text, data, or stack space. This does not include
* pages which have not been demand-loaded in, or which are swapped out */
PROP_RSS = "RSS",
-
+
/** Current limit in bytes on the rss of the process */
PROP_RLIMIT = "RLimit",
-
+
/** The address above which program text can run */
PROP_CODESTART = "CodeStart",
-
+
/** The address below which program text can run */
PROP_CODEEND = "CodeEnd",
-
+
/** The address of the start of the stack */
PROP_STACKSTART = "StackStart",
-
+
/** The bitmap of pending signals */
PROP_SIGNALS = "Signals",
-
+
/** The bitmap of blocked signals */
PROP_SIGBLOCK = "SigBlock",
-
+
/** The bitmap of ignored signals */
PROP_SIGIGNORE = "SigIgnore",
-
+
/** The bitmap of caught signals */
PROP_SIGCATCH = "SigCatch",
-
+
/** This is the "channel" in which the process is waiting. It is the
* address of a system call, and can be looked up in a name list if you
* need a textual name */
PROP_WCHAN = "WChan",
-
+
/** Number of pages swapped */
PROP_NSWAP = "NSwap",
-
+
/** Cumulative NSwap for child processes */
PROP_CNSWAP = "CNSwap",
-
+
/** Signal to be sent to parent when this process exits */
PROP_EXITSIGNAL = "ExitSignal",
-
+
/** CPU number last executed on */
PROP_PROCESSOR = "Processor",
-
+
/** Real-time scheduling priority */
PROP_RTPRIORITY = "RTPriority",
-
+
/** Scheduling policy */
PROP_POLICY = "Policy";
@@ -240,113 +240,113 @@ public interface ISysMonitor extends IService {
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/
interface SysMonitorContext {
- /**
+ /**
* Get context ID.
* Same as getProperties().get(“ID”)
*/
String getID();
- /**
+ /**
* Get parent context ID.
* Same as getProperties().get(“ParentID”)
*/
String getParentID();
- /**
+ /**
* Get process group ID.
* Same as getProperties().get(“PGRP”)
*/
long getPGRP();
- /**
+ /**
* Get process ID.
* Same as getProperties().get(“PID”)
*/
long getPID();
- /**
+ /**
* Get process parent ID.
* Same as getProperties().get(“PPID”)
*/
long getPPID();
- /**
+ /**
* Get process TTY group ID.
* Same as getProperties().get(“TGID”)
*/
long getTGID();
- /**
+ /**
* Get tracer process ID.
* Same as getProperties().get(“TracerPID”)
*/
long getTracerPID();
- /**
+ /**
* Get process owner user ID.
* Same as getProperties().get(“UID”)
*/
long getUID();
- /**
+ /**
* Get process owner user name.
* Same as getProperties().get(“UserName”)
*/
String getUserName();
- /**
+ /**
* Get process owner user group ID.
* Same as getProperties().get(“UGID”)
*/
long getUGID();
- /**
+ /**
* Get process owner user group name.
* Same as getProperties().get(“GroupName”)
*/
String getGroupName();
-
- /**
+
+ /**
* Get process state.
* Same as getProperties().get(“State”)
*/
String getState();
- /**
+ /**
* Get process virtual memory size in bytes.
* Same as getProperties().get(“VSize”)
*/
long getVSize();
- /**
+ /**
* Get process virtual memory page size in bytes.
* Same as getProperties().get(“PSize”)
*/
long getPSize();
- /**
+ /**
* Get number of memory pages in process resident set.
* Same as getProperties().get(“RSS”)
*/
long getRSS();
- /**
+ /**
* Get context executable file.
* Same as getProperties().get(“File”)
*/
String getFile();
- /**
+ /**
* Get context current file system root.
* Same as getProperties().get(“Root”)
*/
String getRoot();
- /**
+ /**
* Get context current working directory.
* Same as getProperties().get(“CWD”)
*/
@@ -358,21 +358,21 @@ public interface ISysMonitor extends IService {
*/
Map<String,Object> getProperties();
}
-
- /**
+
+ /**
* Get context command line.
*/
IToken getCommandLine(String id, DoneGetCommandLine done);
-
+
interface DoneGetCommandLine {
void doneGetCommandLine(IToken token, Exception error, String[] cmd_line);
}
- /**
+ /**
* Get context environment variables.
*/
IToken getEnvironment(String id, DoneGetEnvironment done);
-
+
interface DoneGetEnvironment {
void doneGetEnvironment(IToken token, Exception error, String[] environment);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
index 204f45c04..186e68555 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,57 +30,57 @@ public abstract class TCFDataCache<V> implements Runnable {
private boolean valid;
private boolean posted;
private V data;
-
+
protected final IChannel channel;
protected IToken command;
private final HashSet<Runnable> waiting_list = new HashSet<Runnable>();
-
+
public TCFDataCache(IChannel channel) {
assert channel != null;
this.channel = channel;
}
-
+
private void post() {
if (posted) return;
if (waiting_list.isEmpty()) return;
Protocol.invokeLater(this);
posted = true;
}
-
+
/**
* @return true if cache contains up-to-date data (or data retrieval error).
*/
public boolean isValid() {
return valid;
}
-
+
/**
* @return true if data retrieval command is in progress.
*/
public boolean isPending() {
return command != null;
}
-
+
/**
* @return error object if data retrieval ended with an error, or null if retrieval was successful.
- * Note: It is prohibited to call this method when cache is not valid.
+ * Note: It is prohibited to call this method when cache is not valid.
*/
public Throwable getError() {
assert valid;
return error;
}
-
+
/**
* @return cached data object.
- * Note: It is prohibited to call this method when cache is not valid.
+ * Note: It is prohibited to call this method when cache is not valid.
*/
public V getData() {
assert Protocol.isDispatchThread();
assert valid;
return data;
}
-
+
/**
* Notify waiting clients about cache state change and remove them from wait list.
* It is responsibility of clients to check if the state change was one they are waiting for.
@@ -95,7 +95,7 @@ public abstract class TCFDataCache<V> implements Runnable {
r.run();
}
}
-
+
/**
* Add a client call-back to cache wait list.
* Client call-backs are activated when cache state changes.
@@ -108,7 +108,7 @@ public abstract class TCFDataCache<V> implements Runnable {
assert !valid;
if (cb != null) waiting_list.add(cb);
}
-
+
/**
* Initiate data retrieval if the cache is not valid.
* @return true if the cache is already valid
@@ -130,7 +130,7 @@ public abstract class TCFDataCache<V> implements Runnable {
post();
return true;
}
-
+
/**
* End cache pending state.
* @param token - pending command handle.
@@ -163,7 +163,7 @@ public abstract class TCFDataCache<V> implements Runnable {
valid = true;
post();
}
-
+
/**
* Invalidate the cache. If retrieval is in progress - let it continue.
*/
@@ -174,7 +174,7 @@ public abstract class TCFDataCache<V> implements Runnable {
data = null;
post();
}
-
+
/**
* Force cache to invalid state, cancel pending data retrieval if any.
*/
@@ -189,7 +189,7 @@ public abstract class TCFDataCache<V> implements Runnable {
data = null;
post();
}
-
+
@Override
public String toString() {
StringBuffer bf = new StringBuffer();
@@ -202,7 +202,7 @@ public abstract class TCFDataCache<V> implements Runnable {
bf.append(']');
return bf.toString();
}
-
+
/**
* Sub-classes should override this method to implement actual data retrieval logic.
* @return true is all done, false if retrieval is in progress.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
index a6ba47668..dc91e85dc 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -24,15 +24,15 @@ import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
/**
* TCFFileInputStream is high performance InputStream implementation over TCF FileSystem service.
* The class uses read-ahead buffers to achieve maximum throughput.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
*/
public final class TCFFileInputStream extends InputStream {
-
+
private static final int MAX_READ_AHEAD = 8;
-
+
private static class Buffer {
-
+
final long offset;
IToken token;
@@ -42,13 +42,13 @@ public final class TCFFileInputStream extends InputStream {
Buffer(long offset) {
this.offset = offset;
}
-
+
@Override
public String toString() {
return "[" + offset + ":" + (buf == null ? "null" : Integer.toString(buf.length)) + "]";
}
}
-
+
private final IFileHandle handle;
private final IFileSystem fs;
private final int buf_size;
@@ -56,11 +56,11 @@ public final class TCFFileInputStream extends InputStream {
private long offset = 0;
private Buffer buf;
private boolean closed = false;
-
+
private boolean suspend_read_ahead;
private Runnable waiting_client;
private final LinkedList<Buffer> read_ahead_buffers = new LinkedList<Buffer>();
-
+
public TCFFileInputStream(IFileHandle handle) {
this(handle, 0x1000);
}
@@ -70,7 +70,7 @@ public final class TCFFileInputStream extends InputStream {
this.fs = handle.getService();
this.buf_size = buf_size;
}
-
+
private void startReadAhead(Buffer prv) {
if (suspend_read_ahead) return;
if (read_ahead_buffers.size() > 0) {
@@ -110,7 +110,7 @@ public final class TCFFileInputStream extends InputStream {
pos += buf_size;
}
}
-
+
private boolean stopReadAhead(Runnable done) {
suspend_read_ahead = true;
for (Iterator<Buffer> i = read_ahead_buffers.iterator(); i.hasNext();) {
@@ -206,7 +206,7 @@ public final class TCFFileInputStream extends InputStream {
}
return pos;
}
-
+
@Override
public boolean markSupported() {
return true;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
index 33dadd7c7..324dac721 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,11 +25,11 @@ import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
/**
* TCFFileOutputStream is high performance OutputStream implementation over TCF FileSystem service.
* The class uses write-back buffers to achieve maximum throughput.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
*/
public final class TCFFileOutputStream extends OutputStream {
-
+
private static final int MAX_WRITE_BACK = 8;
private final IFileHandle handle;
@@ -46,7 +46,7 @@ public final class TCFFileOutputStream extends OutputStream {
public TCFFileOutputStream(IFileHandle handle) {
this(handle, 0x1000);
}
-
+
public TCFFileOutputStream(IFileHandle handle, int buf_size) {
this.handle = handle;
this.fs = handle.getService();
@@ -89,7 +89,7 @@ public final class TCFFileOutputStream extends OutputStream {
flush(buf, 0, buf_pos);
buf_pos = 0;
}
-
+
private void flush(final byte[] buf, final int off, final int len) throws IOException {
synchronized (dirty) {
if (flush_error != null) throw flush_error;
@@ -126,7 +126,7 @@ public final class TCFFileOutputStream extends OutputStream {
done(this);
}
}.getIO();
- offset += len;
+ offset += len;
}
@Override
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
index db0386f39..805f9093c 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,25 +26,25 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* communication over TCF framework. Methods are provided to check if the communication is
* complete, to wait for its completion, and to retrieve the result of
* the communication.
- *
+ *
* TCFTask is useful when communication is requested by a thread other then TCF dispatch thread.
* If client has a global state, for example, cached remote data, multithreading should be avoided,
* because it is extremely difficult to ensure absence of racing conditions or deadlocks in such environment.
- * Such clients should consider message driven design, see TCFDataCache and its usage as an example.
- *
+ * Such clients should consider message driven design, see TCFDataCache and its usage as an example.
+ *
* If a client is extending TCFTask it should implement run() method to perform actual communications.
* The run() method will be execute by TCF dispatch thread, and client code should then call either done() or
- * error() to indicate that task computations are complete.
+ * error() to indicate that task computations are complete.
*/
public abstract class TCFTask<V> implements Runnable, Future<V> {
-
+
private V result;
private boolean done;
private Throwable error;
private boolean canceled;
private IChannel channel;
private IChannel.IChannelListener channel_listener;
-
+
/**
* Construct a TCF task object and schedule it for execution.
*/
@@ -60,7 +60,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
});
}
-
+
/**
* Construct a TCF task object and schedule it for execution.
* The task will be canceled if it is not completed after given timeout.
@@ -83,7 +83,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
});
}
-
+
/**
* Construct a TCF task object and schedule it for execution.
* The task will be canceled if the given channel is closed or
@@ -117,11 +117,11 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
});
}
-
+
/**
* Set a result of this task and notify all threads waiting for the task to complete.
* The method is supposed to be called in response to executing of run() method of this task.
- *
+ *
* @param result - the computed result
*/
public synchronized void done(V result) {
@@ -135,11 +135,11 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
if (channel != null) channel.removeChannelListener(channel_listener);
notifyAll();
}
-
+
/**
* Set a error and notify all threads waiting for the task to complete.
* The method is supposed to be called in response to executing of run() method of this task.
- *
+ *
* @param error - computation error.
*/
public synchronized void error(Throwable error) {
@@ -202,7 +202,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
return result;
}
-
+
/**
* Waits if necessary for the computation to complete, and then
* retrieves its result.
@@ -293,18 +293,18 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
/**
- * Returns <tt>true</tt> if this task completed.
+ * Returns <tt>true</tt> if this task completed.
*
* Completion may be due to normal termination, an exception, or
* cancellation -- in all of these cases, this method will return
* <tt>true</tt>.
- *
+ *
* @return <tt>true</tt> if this task completed.
*/
public synchronized boolean isDone() {
return error != null || done;
}
-
+
/**
* Return task execution error if any.
* @return Throwable object or null
@@ -312,7 +312,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
protected Throwable getError() {
return error;
}
-
+
/**
* Return task execution result if any.
* @return result object
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
index 275f9c113..c3e18cc16 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -125,7 +125,7 @@ public class Activator extends AbstractUIPlugin {
plugin.getLog().log(new Status(IStatus.ERROR,
plugin.getBundle().getSymbolicName(), IStatus.OK, msg, err));
}
- }
+ }
/**
* Send error message into Eclipse log.
@@ -139,5 +139,5 @@ public class Activator extends AbstractUIPlugin {
plugin.getLog().log(new Status(IStatus.ERROR,
plugin.getBundle().getSymbolicName(), IStatus.OK, "Unhandled exception in TCF UI", err));
}
- }
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
index a69de7533..2992ea554 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,33 +22,33 @@ import org.eclipse.swt.graphics.Image;
import org.osgi.framework.Bundle;
public class ImageCache {
-
+
public static final String
IMG_TCF = "icons/tcf.gif",
IMG_TARGET_TAB = "icons/target_tab.gif",
IMG_TARGET_WIZARD = "icons/full/wizban/debug_wiz.png",
IMG_ARGUMENTS_TAB = "icons/arguments_tab.gif",
IMG_ATTRIBUTE = "icons/attribute.gif",
-
+
IMG_THREAD_TERMINATED = "icons/full/obj16/threadt_obj.gif",
IMG_THREAD_SUSPENDED = "icons/full/obj16/threads_obj.gif",
IMG_THREAD_RUNNNIG = "icons/full/obj16/thread_obj.gif",
-
+
IMG_PROCESS_TERMINATED = "icons/full/obj16/debugtt_obj.gif",
IMG_PROCESS_SUSPENDED = "icons/full/obj16/debugts_obj.gif",
IMG_PROCESS_RUNNING = "icons/full/obj16/debugt_obj.gif",
-
+
IMG_REGISTER = "icons/full/obj16/genericregister_obj.gif",
-
+
IMG_VARIABLE = "icons/full/obj16/genericvariable_obj.gif",
-
+
IMG_SIGNALS = "icons/signals.gif",
-
+
IMG_ARRAY_PARTITION = "icons/full/obj16/arraypartition_obj.gif",
-
+
IMG_STACK_FRAME_SUSPENDED = "icons/full/obj16/stckframe_obj.gif",
IMG_STACK_FRAME_RUNNING = "icons/full/obj16/stckframe_running_obj.gif",
-
+
IMG_BREAKPOINT_ENABLED = "icons/full/obj16/brkp_obj.gif",
IMG_BREAKPOINT_DISABLED = "icons/full/obj16/brkpd_obj.gif";
@@ -78,7 +78,7 @@ public class ImageCache {
}
return descriptor;
}
-
+
public static synchronized Image getImage(ImageDescriptor desc) {
Image image = image_cache.get(desc);
if (image == null) {
@@ -87,7 +87,7 @@ public class ImageCache {
}
return image;
}
-
+
public static synchronized Image getImage(String name) {
return getImage(getImageDescriptor(name));
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
index e9d9c122b..b74c506ea 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
index 77d164525..e3d0c2f41 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
index 0ebad922d..fab257da2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,14 +18,14 @@ import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
public class TCFNodeAdapterFactory implements IAdapterFactory {
-
+
private static final Class<?>[] adapter_list = {
IToggleBreakpointsTarget.class,
IToggleBreakpointsTargetExtension.class,
};
-
+
private final BreakpointCommand breakpoint_command = new BreakpointCommand();
-
+
@SuppressWarnings("unchecked")
public Object getAdapter(Object obj, Class cls) {
if (obj instanceof TCFNode) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
index e76415378..8df99a35e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -59,7 +59,7 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
if (part instanceof IViewPart) view = (IViewPart)part;
window = part.getSite().getWorkbenchWindow();
}
-
+
public void run(IAction action) {
IAction action0 = this.action;
try {
@@ -74,7 +74,7 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
public void runWithEvent(IAction action, Event event) {
run(action);
}
-
+
public void selectionChanged(IAction action, ISelection selection) {
this.selection = selection;
IAction action0 = this.action;
@@ -86,25 +86,25 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
this.action = action0;
}
}
-
+
public IAction getAction() {
return action;
}
-
+
public IViewPart getView() {
return view;
}
-
+
public IWorkbenchWindow getWindow() {
if (view != null) return view.getSite().getWorkbenchWindow();
if (window != null) return window;
return null;
}
-
+
public ISelection getSelection() {
return selection;
}
-
+
public TCFNode getSelectedNode() {
if (selection instanceof IStructuredSelection) {
final Object o = ((IStructuredSelection)selection).getFirstElement();
@@ -126,8 +126,8 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
}
return null;
}
-
+
protected abstract void selectionChanged();
-
+
protected abstract void run();
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
index ff952707a..ba9275fbf 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -27,7 +27,7 @@ import org.eclipse.ui.IWorkbenchPart;
public class BreakpointCommand implements IToggleBreakpointsTargetExtension {
-
+
public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
if (selection.isEmpty()) return false;
Object obj = ((IStructuredSelection)selection).getFirstElement();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
index 854b173b0..527fe1cc6 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
index 6118ae199..236dfc30b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
index 8f2e6bde2..57e9c4ad4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
public class SignalsCommand extends AbstractActionDelegate {
-
+
protected void selectionChanged() {
boolean e = false;
TCFNode n = getSelectedNode();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
index e4ac836e9..66726f50a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -48,37 +48,37 @@ import org.eclipse.tm.tcf.util.TCFTask;