length

nazarijtipusak080/buffer1/length

Shows the number of bytes in the buffer.
length
@/length
Shows the number of bytes in the buffer.
buffer1@/buffer1
length
buffer
val
buffer1
valnumber
buffer@/buffer1
To use the node in your project you should have the nazarijtipusak080/buffer1 library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

//-- int buffer1::length()
// Our constructor namespace should be: buffer1_ll__buffer1
struct State {
  // not used
  };

{{ GENERATED_CODE }}

void evaluate(Context ctx) {

  if ( !isInputDirty<input_buffer1>(ctx) ) return;

  auto _object = getValue<input_buffer1>(ctx); // buffer1
  auto _rez = _object->len; // size_t in real life. Report 0 if actually 0

  emitValue<output_buffer>(ctx, _object); // convenience
  emitValue<output_val>(ctx, _rez); // int

}