package rmrCgo
-// #cgo LDFLAGS: -L/usr/local/lib -lrmr_nng -lnng
+// #cgo LDFLAGS: -L/usr/local/lib -lrmr_si
// #include <rmr/rmr.h>
// #include <stdlib.h>
import "C"
Len: int(m.len),
Payload: &payloadArr,
XAction: &xActionArr,
+ msgSrc: C.CBytes(make([]byte, RMR_MAX_SRC_LEN)),
}
+ C.rmr_get_src(m, (*C.uchar)(mbuf.msgSrc)) // Capture message source
+
meidBuf := make([]byte, RMR_MAX_MEID_LEN)
if meidCstr := C.rmr_get_meid(m, (*C.uchar)(unsafe.Pointer(&meidBuf[0]))); meidCstr != nil {
mbuf.Meid = strings.TrimRight(string(meidBuf), "\000")
//TODO: change to assert or return error
func (ctx *Context) checkContextInitialized() {
if ctx.RmrCtx == nil {
- if ctx.Logger != nil {
+ /*if ctx.Logger != nil {
ctx.Logger.DPanicf("#rmrCgoUtils.checkContextInitialized - The RMR router has not been initialized")
- }
+ }*/
panic("#rmrCgoUtils.checkContextInitialized - The RMR router has not been initialized. To initialize router please call Init() method")
}
}