def write_to_shm()

in tutorials/app/edge_agent_utils.py [0:0]


def write_to_shm(sm, payload):
    if sm.attached: sm.detach()
    # set mode read/write
    sm.mode = 0o0600
    sm.attach()
    sm.write(payload.astype(np.float32).tobytes())
    # set mode read only
    sm.mode = 0o0400