Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 165985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:01:07+00:00 2026-05-11T12:01:07+00:00

I am creating an application for mobile phone which sends the acceleration measurements through

  • 0

I am creating an application for mobile phone which sends the acceleration measurements through TCP connection to the server.

I would like to reduce the message length as much as possible but in the same time I would like to make it the current format possible to extend without a lot of pain on modifying receiver parsing mechanism.

At the beginning I send a string in a following format:

##measurementTime#AccelerationX#AccelerationY#AccelerationZ 

butsoon after the implementation I added to the message some other data and I realized it will take a lot of time if I will have to modify the format frequently.

I was thinking about the XML, but it adds a lot of load which of course I would like to avoid (the measurements are sent every 100-250 ms).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:01:07+00:00Added an answer on May 11, 2026 at 12:01 pm

    One recommendation is sending simple key name / value pairs if you need to stick completely to an ASCII text type stream. The key name is used to describe the name of the field that each value conveys similar to original proposal:

    ##keyName1=value1#keyName2=value2# 

    Alternatively, you can send data in a binary tagged format such as this:

    <tagCodeNum><lengthInBytes><tagValueAsBytes> 

    where tagCodeNum is perhaps a byte or word and length is a byte or word depending on your needs. The idea of this format is that the receiver can recognize fields that it understands by the code number and then can also skip tags it doesn’t know how to decode. In this way, the encoding becomes extensible. If you need multiple tags grouped into logical messages, I would wrap a group of these binary coded tags in an overall message hierarchy:

    <messageCodeNum><lengthInBytes><tag><tag><tag> 

    Where the tag above is a replication of the previous tag construction described above and length describes the byte length of all the tags combined together.

    Note: If you think about this structure, not a whole lot different than an XML type structure but it is a lot more concise and constrained so that it is nearly trivial to decode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a C# Windows Mobile application that I need to programmatically invoke
I am creating a mobile web application using asp.net. The application must support iPhone,
I'm creating an application which lets you define events with a time frame. I
I am creating an application in java which will be the part of an
I am creating an application in which I have two mxml components, MainPanel.mxml and
I'm creating an application that will store a hierarchical collection of items in an
I'm currently creating an application for a customer that will allow them to automatically
I am creating an application were I need to scan a directory hive to
I am creating an application that manages multiple instances of an external utility, supplying
I am creating an application in .NET that will serve as a second UI

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.