Giter Club home page Giter Club logo

Comments (2)

cookpate avatar cookpate commented on July 18, 2024

This actually looks more like a race condition in LogInfo for this demo. IT should have printed out an example job, but this is an example console output in the ESP-IDF 4.2 PowerShell window:

14 495 [iot_thread] [jobs_demo.c:833] [INFO] [JobsDemo]
/*-----------------------------------------------------------*/

The Jobs demo is now ready to accept Jobs.
https://docs.aws.amazon.com/cli/latest/reference/iot/create-job.htmlJobsDemo]

 - print          ] [jobs_demo.c:843] [INFO] [JobsDemo]  key.
   Logs a message to the local console. The Job document must also contain a "message".
 - publish        "action17 495 [iot_thread] [jobs_demo.c:846] [INFO] [JobsDemo]
   Publishes a message to an MQTT topic. The Job document must also contain a "message" and "topic".


   For example: { "action": "publish", "topic": "demo/jobs", "message": "Hello world!"} will cause
 - exit           to be published 19 495 [iot_thread] [jobs_demo.c:854] [INFO] [JobsDemo]
   Exits the demo program. This program will run until { "action": "exit" } is received.

/*--------------------20 495 [iot_thread] [mqtt_demo_helpers.c:565] [INFO] [MQTT] Attempt to subscribe to the MQTT topic $aws/things/cookpateESP32-TestBoard/jobs/notify-next.

This is printed out from here:

LogInfo( ( "\r\n"
"/*-----------------------------------------------------------*/\r\n"
"\r\n"
"The Jobs demo is now ready to accept Jobs.\r\n"
"Jobs may be created using the AWS IoT console or AWS CLI.\r\n"
"See the following link for more information.\r\n" ) );
LogInfo( ( "\r"
"https://docs.aws.amazon.com/cli/latest/reference/iot/create-job.html\r\n"
"\r\n"
"This demo expects Job documents to have an \"action\" JSON key.\r\n"
"The following actions are currently supported:\r\n" ) );
LogInfo( ( "\r"
" - print \r\n"
" Logs a message to the local console. The Job document must also contain a \"message\".\r\n"
" For example: { \"action\": \"print\", \"message\": \"Hello world!\"} will cause\r\n"
" \"Hello world!\" to be printed on the console.\r\n" ) );
LogInfo( ( "\r"
" - publish \r\n"
" Publishes a message to an MQTT topic. The Job document must also contain a \"message\" and \"topic\".\r\n" ) );
LogInfo( ( "\r"
" For example: { \"action\": \"publish\", \"topic\": \"demo/jobs\", \"message\": \"Hello world!\"} will cause\r\n"
" \"Hello world!\" to be published to the topic \"demo/jobs\".\r\n" ) );
LogInfo( ( "\r"
" - exit \r\n"
" Exits the demo program. This program will run until { \"action\": \"exit\" } is received.\r\n"
"\r\n"
"/*-----------------------------------------------------------*/\r\n" ) );

from amazon-freertos.

cookpate avatar cookpate commented on July 18, 2024

Ah, it looks like the carriage return at the beginning of log messages isn't overwriting the current line. It's a hacky way of suppressing the log message header.

from amazon-freertos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.