Thread: How to delare a schedule table in C?

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    54

    How to delare a schedule table in C?

    Hi everyone,

    I have to set up a schedule table in C, but I don't know how. Something like this:

    0 RT3 T SA 10


    100msec RT4 R SA 6

    110msec RT5 R SA 7
    111msec RT5 R SA 8
    .
    .


    Anyone know about this, please help! Thanks a bunch!

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    124
    You mean something like a table of strings?
    Loading.....
    ( Trying to be a good C Programmer )

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    How about a struct. I'm kinda guessing what you're after here, you haven't given us much to go on.
    Code:
    typedef struct
    {
      int Something1;
      int Something2;
      int Something3;
    } schedulerow_t;
    
    schedulerow_t MySchedule[100];
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User
    Join Date
    Mar 2002
    Posts
    54
    Sorry for not giving much info. This is the first time I'm working with the MIL-STD1553, but I don't know much about it
    First of all, I need to define a structure like this:
    Code:
    typedef struct
    {
      int RT#;
      T/R     0/1;
      int  SA#;
      int #words;
    } schedulerow_t;
    Then I will need to set up a schedule table like the first message. It means at time 0 msecond, RT3 will Transfer to SA 10, then at time 100 msec RT will Receive from SA6, and so on.
    Any help would be appreciated.

  5. #5
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    I'll bet most on this board have never heard of, let alone used, MIL-STD1553. I for one haven't a clue.

    Originally posted by vnrabbit
    First of all, I need to define a structure like this:
    Code:
    typedef struct
    {
      int RT#;
      T/R     0/1;
      int  SA#;
      int #words;
    } schedulerow_t;
    OK, you have a structure which you've defined with major syntax problems. Can you define the structure correctly or is that what you're having problems with -- basic C syntax?

    Originally posted by vnrabbit
    I have to set up a schedule table in C, but I don't know how. Something like this:

    0 RT3 T SA 10
    100msec RT4 R SA 6

    110msec RT5 R SA 7
    111msec RT5 R SA 8
    .
    .
    When it comes to your schedule table, it looks like you've defined that too. I therefore see no problem. You need to explain what you are having trouble with -- exactly.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  2. progarm doesnt compile
    By kashifk in forum Linux Programming
    Replies: 2
    Last Post: 10-25-2003, 05:54 PM
  3. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  4. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM
  5. help with operator <
    By kashifk in forum C++ Programming
    Replies: 1
    Last Post: 10-21-2003, 03:49 PM