Search:

Type: Posts; User: DavidDobson

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    5,383

    Hi I found the problem, I was not forming my...

    Hi

    I found the problem, I was not forming my GET request properly

    now: GET Google HTTP/1.1\n\n

    Returns what I need :)

    Tho thanks for the response qwertyLurker, ill have a look at libcURL...
  2. Replies
    3
    Views
    5,383

    Http Client

    Hi Everyone

    I am developing for Linux and am looking for a way to retrieve HTTP pages from the internet, I have found a couple of tutorials that have shown me how to get the basics sorted out:

    ...
  3. Replies
    1
    Views
    943

    Simple Number Concatination

    Hi

    I have two 16bit numbers (in Hex):

    0x1234

    &&

    0x2119
  4. Replies
    6
    Views
    1,140

    Thanks both of you, just wanted to make sure I...

    Thanks both of you, just wanted to make sure I was not missing anything blindingly obvious, ill try re-arranging the if | sequence and look into adding a hasPending bit :)

    Thank you :)

    David
  5. Replies
    6
    Views
    1,140

    Simple Efficiency Query

    Hi

    Can anyone think of a batter way of doing this:


    #define NONE 0x00
    #define PENDING 0x01
    #define REQUESTED 0x02

    typedef struct {
  6. Replies
    7
    Views
    5,837

    Thank you every one for your help, I have been...

    Thank you every one for your help, I have been playing with the htons and ntohs functions to try to get the order to reverse:


    uint16_t var1 = 0x1234;

    printf("htons: %04X | \n", htons(var1));...
  7. Replies
    7
    Views
    5,837

    ahh ic, yes that has worked - annoying but hey -...

    ahh ic, yes that has worked - annoying but hey - if it works...

    Just to make sure I understand what I had been reading: the Linux system is a Little endian based system and my embedded system is a...
  8. Replies
    7
    Views
    5,837

    Backwards uint16_t?

    Hello

    I have a function that takes a strut and turns it into a uint8_t array. This code is running on an embedded device and works well. I have recently copied this code to a linux development...
  9. Replies
    2
    Views
    1,950

    Embaracing Array question

    Hi everyone

    This is a REALLY silly question but:

    if I declare an array like this:


    uint8_t myArray[5];

    I get a one dimensional array of uint8_ts...
  10. Replies
    6
    Views
    1,224

    oh right I see, ill try that, many thanks David

    oh right I see, ill try that, many thanks

    David
  11. Replies
    6
    Views
    1,224

    Hi Sorry, not quite with you? I'm not passing...

    Hi

    Sorry, not quite with you? I'm not passing global variables between functions, i'm passing pointers.

    David
  12. Replies
    6
    Views
    1,224

    Hi thanks for the reply :) So after I do...

    Hi

    thanks for the reply :)

    So after I do this:


    GlobalPowerData = *LPD;

    and the function in which the LPD variable is defined, created and set finishes (thus removing the local LPD...
  13. Replies
    6
    Views
    1,224

    Buffers, pointers and such

    Hi

    I am trying to cast a byte buffer (that is contained within a struct) to a different struct variable:


    typedef struct {

    uint8_t protocolVersion;
    uint8_t messageCount;
    uint8_t...
  14. Replies
    1
    Views
    4,363

    2 uint8_t to a uint16?

    Hi

    I'm looking for a way to take two uint8_t values and place them in a Uint16_t...


    uint8_t bob 0xDD;
    uint8_t fred 0xFF;

    uint16_t tom;
  15. Replies
    9
    Views
    1,983

    Spot the diffrence

    Hi

    what is the difference between:


    uint8_t size = 50;

    --
  16. Possibly a stupidly simple question about byte arrays in structs…

    Hi

    I have a struct variable as such:


    typedef struct {

    uint8_t header[APS_ASDU_OFFSET];
    uint8_t data[sizeof(AppLowPowerData_t)];
    uint8_t footer[APS_AFFIX_LENGTH -...
  17. Replies
    11
    Views
    1,564

    ah! that did it - thanks everyone :D

    ah! that did it - thanks everyone :D
  18. Replies
    11
    Views
    1,564

    Hi - thanks for the reply - sadly if i do that...

    Hi - thanks for the reply - sadly if i do that the data within the strut get mangled, do I need to specify its the pointer I want to increment or something?

    David
  19. Replies
    11
    Views
    1,564

    offset a cast?

    Hi

    I have a uint8_t array that I am casting to a struct:



    void processe(uint8_t *buffer, int length) {
    AppConfigData_t* configData;
    configData = (AppConfigData_t *) buffer;
    } //...
  20. Replies
    9
    Views
    12,570

    Struct to Uint8_t array help please?

    Hi

    I have a struct variable that contains some data:


    typedef struct {
    uint8_t commandIssued;
    uint16_t oraginAddress;
    bool success;
    } PACK AppCommandAck_t;
  21. Replies
    1
    Views
    2,055

    struct packet array sizes?

    Hi

    I have a strut variable that I am using as a packet template for communication within my C application:


    typedef struct
    {
    uint8_t header[HEADER_OFFSET];
    uint8_t ...
  22. Replies
    2
    Views
    964

    -= operation (minGw)

    Hi

    I am using the -= operation on a uint8_t number but when I debug / execute the number does not reduce by the value I give it, done anyone know why?



    uint8_t number;

    number = 15;
  23. ah ha! option number two works, many thanks - I...

    ah ha! option number two works, many thanks - I was really stuck on that!

    :D

    David
  24. warning: cast to pointer from integer of different size

    Hi

    I'm sure this is a simple problem but I'm quite stuck, when ever I compile my code I get the "warning: cast to pointer from integer of different size" warning. Could someone show me how to...
  25. Replies
    2
    Views
    1,730

    ah! that did it! - Thanks :) int main() { ...

    ah! that did it! - Thanks :)


    int main()
    {
    uint64_t macAddress = 0xABCDEF0123456789LL;
    uint16_t shortAddress = 0x0000;
    shortAddress = (uint16_t)macAddress;
    printf("SHort...
Results 1 to 25 of 58
Page 1 of 3 1 2 3