# Target Communication Framework Services

Copyright (c) 2007 Wind River Systems, Inc. Made available under the EPL v1.0

Direct comments, questions to the dsdp-tm-dev@eclipse.org mailing list

## Table of Contents

- Overview
- Syntax Rules Notation
- Error Report Format
- Services

## Overview

TCF communication model is based on the idea of services. A service is a group of related commands, events and semantics. For example, Memory Service defines group of command and events for reading and writing target memory. Service definitions are not part of the framework specification, 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.

## Syntax Rules Notation

Format of the protocol messages is defined by syntax rules. Syntax is described using a simple variant of Backus-Naur Form. In particular:

- Italic lower case words in a courier font, enclosed into angular brackets, are used to denote syntactic categories, for example: <token>. Category name can be followed by colon and a text, which explains semantics of the category, for example: <int: error code> has same meaning as <int>, but denotes that the integer number used to indicate an "error code".
- 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:

    <chars>
        Ø <char>
        Ø <chars> <char>

- Spaces are added for readability only and they are not part of the syntax.
- All text in the category definition, other than categories and spaces, is UTF-8 based representation of a message bytes.
- The symbol ‘•’ designates a zero byte.

## Error Report Format

Most of TCF standard services use same format for error reporting:

    <error report>
        Ø <int: error code> • <error description>

Error code zero means success. Error description provides a short, localizable, human readable explanation of error.

    <error description>
        Ø null
        Ø <string>
        Ø { "format" : <string> , "params" : [ <params> ] }

    <params>
        Ø <value>
        Ø <params> , <value>

For <string> and <value> encoding see JSON - Preferred Marshaling. Error description format supports separation between constant and variable parts of the message ("format" and "params"). This is done to support localization. See Java class java.text.MessageFormat for details.

## Services

- Memory Service
- Processes Service
- Run Control Service
- Registers Service
- Stack Trace Service
- Breakpoints Service
- File System Service
- System Monitor Service