MQTT?
qtbxxsc
Posts: 13
Does AMX support MQTT protocol?
0
Does AMX support MQTT protocol?
Comments
Not natively, but like most things - you can code for that. We have used it in several proof of concept projects internally.
https://youtu.be/ZOiR6ZQo2BE
I have found the mqtt module in Harman training and it is usable. Can uuid4 be written with NS4 software? Written in Java format, the operation is unsuccessful. The long of NX is 32 bits, and the long of java is 64 bits, which requires bit operations.
I have found the mqtt module in Harman training and it is usable. Can uuid4 be written with NS4 software? Written in Java format, the operation is unsuccessful. The long of NX is 32 bits, and the long of java is 64 bits, which requires bit operations.
China can't go to YouTube
NS
define_function randomUUID()
{~~~~
char ng
char randomBytes[16]
randomBytes[1]=random_number(255)
randomBytes[2]=random_number(255)
randomBytes[3]=random_number(255)
randomBytes[4]=random_number(255)
randomBytes[5]=random_number(255)
randomBytes[6]=random_number(255)
randomBytes[7]=random_number(255)
randomBytes[8]=random_number(255)
randomBytes[9]=random_number(255)
randomBytes[10]=random_number(255)
randomBytes[11]=random_number(255)
randomBytes[12]=random_number(255)
randomBytes[13]=random_number(255)
randomBytes[14]=random_number(255)
randomBytes[15]=random_number(255)
randomBytes[16]=random_number(255)
}
define_function UUID(Char fdata[16])
{
char i
// long msb;
// long lsb;
msb =0
lsb =0
for (i=1; i<=8; i++)
//为什么要&0xff?是因为要不能或上一个负数byte,char,short的&都是转换为int的
//因为long类型是64位,在进行|运算时,需要补全0才可以运算
msb = (msb << 8) | (fdata[i] & $ff);
for (i=9; i<=16; i++)
lsb = (lsb << 8) | (fdata[i] & $ff);
toString()
}
define_function toString()
{
sUUID="digits(msb >> 32, 8),'-',
digits(msb >> 16, 4),'-',
digits(msb, 4),'-',
digits(lsb >> 48, 4),'-',
digits(lsb, 12)";
}
define_function char[50] digits(long val, char len)
{
long hi
hi= 1 << (len * 4);
return itohex(hi | (val & (hi - 1)));
}
Java
private final long mostSigBits; // 高字节
————————————————
some one can help me?
NetLinx DOUBLE is 64-bits
But
ERROR: E:\XIEYI\AMX Moudle\MQTT Code Examples\uuid\uuid.axs(75): C10584: Illegal type [DOUBLE] for a bitwise operation
Does anyone know if this ever got an answer? I have exactly the same issue - I need a Netlinx equivalent of a 'long long' (64 bit integer) - NOT a double as I need to perform a bitwise operation on it. AFAIK using TYPE_CAST only works on 32 bit integers?
Thanks
Simon
MQTT Client module is officially released.
All the info in the LinkedIn post
https://www.linkedin.com/posts/ian-craigie-1933a222_mqtt-paho-java-activity-6792519002011918336-at1v