Parsing commands and parameters


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Parsing commands and parameters

    so a command is *99 or *9 or *09 [where 9 == a numeric digit]
    and a parameter is 9 up to 999999

    how do you signal that the command has been input and the parameter begins

    i would be tempted to use the # as enter

    so cmd 33 p2010 would be
    *33#2100#
    you will need to establish a method to cope with numbers bigger than a word

    you need a method first then code it
    Warning I'm not a teacher

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Parsing commands and parameters

    For a more compact and maybe easier to code the command and data be at defined length.

    So command 9 would be 09 and data 9 (this is extreme but for the sake of discussion) would be 00009.

    So there is no need for extra termination character.

    Also I think word or long variable may not be helpful here. Better an array, since the data are distinct in meaning so a 433925 would mean 433,925MHz in reality as an absolute value.

    The beeps would help user to step with confidence entering the commands and data.

    I think stuffing an array and then select case is the way to do it.

    Ioannis

Similar Threads

  1. Serin parameters ??
    By Rony in forum General
    Replies: 6
    Last Post: - 21st August 2011, 18:01
  2. dc motor parameters
    By iugmoh in forum Off Topic
    Replies: 0
    Last Post: - 10th October 2009, 19:32
  3. DC motor parameters ?
    By iugmoh in forum Off Topic
    Replies: 2
    Last Post: - 28th June 2008, 10:46
  4. MCSP Bootloader Parameters
    By CocaColaKid in forum General
    Replies: 0
    Last Post: - 19th September 2005, 18:15
  5. @ Device Parameters
    By Randy_Suwanee in forum General
    Replies: 2
    Last Post: - 11th August 2004, 14:40

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts