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

  • SEARCH
  • Home
  • 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 8785833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:27:36+00:00 2026-06-13T21:27:36+00:00

I have a structure: typedef struct { LogLevel level; char message[255]; } LogMessage; I

  • 0

I have a structure:

typedef struct {
    LogLevel level;
    char message[255];
} LogMessage;

I then have a function which receives a pointer to a LogMessage structure, and needs to call a function that takes in a char*:

xStatus = xQueueReceive(xQueueHandleGSMSend, &lReceivedData, portMAX_DELAY);

if(xStatus == pdPASS)
{
    logSimpleMessage(&lReceivedData->message, 1);
}

Here is the prototype for the logSimpleMessage function:

void logSimpleMessage(const char * message, int level);

When I attempt to call it with the above code, I am not getting the correct address (or contents) of the message. How do I get a char* that points to the message of lReceivedData?

EDIT: I have attempted to use lReceivedData->message, as suggested, but I am still not getting the correct address or values. Here is a screen cap of the IDE… Am I doing something terribly wrong in the debugger, because it seems as though it should work.

enter image description here

  • 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. Editorial Team
    Editorial Team
    2026-06-13T21:27:38+00:00Added an answer on June 13, 2026 at 9:27 pm

    instead of

    logSimpleMessage(&lReceivedData->message, 1);
    

    you put so:

    logSimpleMessage(lReceivedData->message, 1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a structure: typedef struct stock { const char* key1p2; // stock code
I have a structure typedef struct store { char name[11]; int age; } store;
I have following structure typedef struct List_Node { struct File_Descriptor *data; char *key; struct
I have the structure typedef struct EData { int a; char c; } Edata
I have this structure: typedef struct SM_DB { LIST_TYPE link; char name[SM_NAME_SIZE]; } SM_DB_TYPE;
I have the following structure typedef struct DeviceInfo { char[30] name; char[30] serial Number;
I have this structure : typedef struct xmlelem{ Char *Element_name; Char *Element_Text; pAttr_Element attr_arr[M];
I have this structure: typedef struct { char *str; ... } nameType; I create
If I have a structure such as typedef struct _people { char *name; bool
Assuming I have a structure such as: typedef struct { char * string1; char

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.