From 3008d4750370013e6e9750ddb00039df362dbb5a Mon Sep 17 00:00:00 2001 From: eutarass Date: Mon, 7 Apr 2008 19:56:45 +0000 Subject: Bug 223520: [tcf] Registers service changes: data formatting is removed from the service. --- docs/TCF Service - Registers.html | 46 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'docs') diff --git a/docs/TCF Service - Registers.html b/docs/TCF Service - Registers.html index ef346af69..1638c2306 100644 --- a/docs/TCF Service - Registers.html +++ b/docs/TCF Service - Registers.html @@ -78,8 +78,11 @@ Service sends contextChanged event to notify changes in context data.

  • "Description" : <string> - context description. -
  • "Formats" : <array of string> - - value formats available for register get/set commands. +
  • "Size" : <boolean> + - context size in bytes. Byte arrays in get/set commandss should be same size. + Hardware register can be smaller then this size, for example in case + when register size is not an even number of bytes. In such case implementation + should add/remove padding that consists of necessary number of zero bits.
  • "Readable" : <boolean> - true if context value can be read. @@ -151,12 +154,11 @@ R

    Set Register

    
    -C • <token> • Registers • set • <string: context ID><string: value format><string: value> •
    +C • <token> • Registers • set • <string: context ID><string: value>

    Writes value into given register context. Context ID must be one returned by getContexts. -Value format must be one that is supported by the register context. -Client can get list of supported formats from context attributes.

    +Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.

    Result message:

    @@ -170,12 +172,11 @@ of error.

    Get Register

    
    -C • <token> • Registers • get • <string: context ID><string: value format> •
    +C • <token> • Registers • get • <string: context ID>

    Reads register value from given register context. Context ID must be one returned by getContexts. -Value format must be one that is supported by the register context. -Client can get list of supported formats from context attributes.

    +

    Result message:

    @@ -184,7 +185,7 @@ R

    Error report provides integer error code and a short, human readable explanation -of error. Value is formatted according to requested format.

    +of error. Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.

    Events

    @@ -215,7 +216,7 @@ E PROP_PROCESS_ID = "ProcessID", PROP_NAME = "Name", PROP_DESCRIPTION = "Description", - PROP_FORMATS = "Formats", + PROP_SIZE = "Size", PROP_READBLE = "Readable", PROP_READ_ONCE = "ReadOnce", PROP_WRITEABLE = "Writeable", @@ -317,11 +318,14 @@ E String getDescription(); /** - * Get value formats available for register get/set commands. - * See FORMAT_* for knows format IDs definition. - * @return array of supported format IDs. + * Get context size in bytes. + * Byte arrays in get()/set() methods should be same size. + * Hardware register can be smaller then this size, for example in case + * when register size is not an even number of bytes. In such case implementation + * should add/remove padding that consists of necessary number of zero bits. + * @return context size in bytes. */ - String[] getAvailableFormats(); + int getSize(); /** * Check if context value can be read. @@ -409,20 +413,18 @@ E /** * Read value of the context. - * @param format - ID of a format to use for result value. * @param done - call back object. * @return - pending command handle. */ - IToken get(String format, DoneGet done); + IToken get(DoneGet done); /** * Set value of the context. - * @param format - ID of a format used for value. * @param value - value to write into the context. * @param done - call back object. * @return - pending command handle. */ - IToken set(String format, String value, DoneSet done); + IToken set(byte[] value, DoneSet done); } /** @@ -431,10 +433,10 @@ E */ interface NamedValue { /** - * Get number associated with this named value. - * @return the value as a number. + * Get value associated with the name. + * @return the value as an array of bytes. */ - Number getValue(); + byte[] getValue(); /** * Get name (mnemonic) of the value. @@ -453,7 +455,7 @@ E * 'get' command call back interface. */ interface DoneGet { - void doneGet(IToken token, Exception error, String value); + void doneGet(IToken token, Exception error, byte[] value); } /** -- cgit v1.2.3