Skip to content Skip to sidebar Skip to footer

How To Access The Data In Javascript From The Ctype Pointer Of Type Uint8_t

I am having some data in ctype uint8_t type pointer which I want to read into the var array in javascript. I have done simple for loop to copy the data, for(var j = 0x00; j < 5

Solution 1:

I've found that [contents] property of a pointer ctypes object can be used to access the object it points to.

try this:

for(var j = 0x00; j < 5; j ++) { 
    var dataReceived[j] = ptr[j].contents; 
}

Post a Comment for "How To Access The Data In Javascript From The Ctype Pointer Of Type Uint8_t"