Biblioteka MQTT i dziwny kod w C

Do you have a question? Post it now! No Registration Necessary

Threaded View







https://github.com/dominicusplatus/mqttx









programu i reset mikrokontrolera.



dane z socketa do bufora MQTTBuffer. Potem jednak kod sprawdza stan stan  

















BYTE llen;
WORD len= MQTTReadPacket(&llen);









Re: Biblioteka MQTT i dziwny kod w C
On 08/08/2022 19:14, Atlantis wrote:
Quoted text here. Click to load it





Re: Biblioteka MQTT i dziwny kod w C
On 08.08.2022 21:00, heby wrote:






Re: Biblioteka MQTT i dziwny kod w C






Quoted text here. Click to load it








Quoted text here. Click to load it


Quoted text here. Click to load it


Quoted text here. Click to load it





Quoted text here. Click to load it


Quoted text here. Click to load it




Quoted text here. Click to load it







Quoted text here. Click to load it




potrzebowalem.

jp


Re: Biblioteka MQTT i dziwny kod w C
On 08.08.2022 19:14, Atlantis wrote:
[...]
Quoted text here. Click to load it
















if(MQTTAvailable()) {
    BYTE llen;
    WORD len = MQTTReadPacket(&llen);
    WORD msgId = 0;
    BYTE *payload;




    switch(rxBF[1]) {   //MQTTBuffer
na
    switch(MQTTBuffer[1]) {   //MQTTBuffer



Re: Biblioteka MQTT i dziwny kod w C
On 09.08.2022 07:13, JDX wrote:






zmienne albo niejawne rzutowanie z char* na BYTE* w argumencie funkcji.

czepia.






















Quoted text here. Click to load it
















Re: Biblioteka MQTT i dziwny kod w C




Odwrotnie. Nie jest inicjalizowana bo nie jest statyczna. Inicjalizacja  



--  
Grzegorz Niemirowski
https://www.grzegorz.net/


Re: Biblioteka MQTT i dziwny kod w C
On 09.08.2022 09:47, Grzegorz Niemirowski wrote:

Quoted text here. Click to load it











lepiej, ani gorzej.








Re: Biblioteka MQTT i dziwny kod w C
On 09.08.2022 08:36, Atlantis wrote:
[...]





komentarzach w kodzie.












Re: Biblioteka MQTT i dziwny kod w C
On 09.08.2022 10:16, JDX wrote:












jedynie pobiera dwa pierwsze bajty.








TCP/IP MLA od Microchipa...






Re: Biblioteka MQTT i dziwny kod w C
On Tue, 9 Aug 2022 07:13:17 +0200, JDX wrote:
Quoted text here. Click to load it






Blad troche dziwaczny, bo w ogole nie widze definicji MQTTReadPacket  

to nadal dziwaczne.
Podejrzewam, ze cos tu przerabiali, i zrezygnowali z podawania adresu.





A jak Atlantis zauwazyl - program bierze z rxBF, tylko juz tam nic nie
zapisuje.












Quoted text here. Click to load it


ale o co im by mialo chodzic? Czemu mieliby uzywac llen - len
niedobre?


Quoted text here. Click to load it

J.


Re: Biblioteka MQTT i dziwny kod w C
On 09.08.2022 19:13, J.F wrote:

Quoted text here. Click to load it

Quoted text here. Click to load it




















kolejne, z czego nas interesuje ostatni - result code.










czytania z socketa). Co jednak istotne, w tej wersji kodu funkcja  








Quoted text here. Click to load it









Re: Biblioteka MQTT i dziwny kod w C






case MQTT_CONNECT_ACK
     WORD len = MQTTReadPacket();
     if (len >= 2) {


     }
break;










Tutaj wywolujemy MQTTReadPacket() w MQTT_CONNECT_ACK




m_state=2
m_state=3
m_state=0

Tutaj wywolujemy MQTTReadPacket() w MQTT_CONNECT_ACK



Tutaj wywolujemy MQTTReadPacket() w MQTT_CONNECT_ACK



Tutaj wywolujemy MQTTReadPacket() w MQTT_CONNECT_ACK




m_state=2
m_state=3
m_state=0

















funkcji.





robi. :)

Re: Biblioteka MQTT i dziwny kod w C
On 09.08.2022 19:13, J.F wrote:
[...]
Quoted text here. Click to load it

Quoted text here. Click to load it






https://stackoverflow.com/questions/13950642/why-does-a-function-with-no-parameters-compared-to-the-actual-function-definiti

https://stackoverflow.com/questions/18378993/c-and-defining-a-function-prototype-with-no-parameters


Re: Biblioteka MQTT i dziwny kod w C
On Wed, 10 Aug 2022 00:13:41 +0200, JDX wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it



Quoted text here. Click to load it

Quoted text here. Click to load it



dzialac.

Co prawda powinno to zostac zdefinioniowane z uzyciem "..."

w prototypie, deklaracji i wywolaniach ...

J.

Re: Biblioteka MQTT i dziwny kod w C



Quoted text here. Click to load it




Quoted text here. Click to load it


int printf ( const char * format, ... );




--  
Grzegorz Niemirowski
https://www.grzegorz.net/


Re: Biblioteka MQTT i dziwny kod w C
























Re: Biblioteka MQTT i dziwny kod w C
On 10/08/2022 19:25, Atlantis wrote:




ledami ;)

Re: Biblioteka MQTT i dziwny kod w C

Quoted text here. Click to load it

Uu pic32 od migania ledami, mocne.

--  
Marek

Re: Biblioteka MQTT i dziwny kod w C
On 10/08/2022 22:06, Marek wrote:

Quoted text here. Click to load it



Site Timeline