Project

General

Profile

Support #18285

Driver needed to piece together MDAT data

Added by Richard Neswold almost 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
High
Assignee:
-
Category:
-
Start date:
11/15/2017
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Greg Vogel requested our group provide a driver to piece together two MDAT frames.

MDAT frames 54 and 55 each contain half of an IEEE 32-bit float value. We need a driver that will grab both halves and form the complete IEEE float and return it as an ACNET device. The SLD can only grab one MDAT frame at a time, so it looks like we need a front-end with a PMCUCD in it.

This issue has been categorized under the general Front-end group project. When we determine which front-end will host this device, we can re-categorize it.

History

#1 Updated by Richard Neswold almost 2 years ago

Here's the MOOC v4.8 code in C++. I don't know how to get the MDAT frames from a PMCUCD, so if any of you want to add this to one of your PMCUCD front-ends, that would be great. You need to provide the get_mdat54() and get_mdat55() functions.

static uint16_t get_mdat54();
static uint16_t get_mdat55();

static STATUS devReading(short, RS_REQ const* req, void* rpyBuf, void*)
{
    try {
        MOOC::ReadingProxy<float> reading(req, rpyBuf);
        union {
            uint32_t i;
            float f;
        } u;

        u.i = (get_mdat54() << 16) | get_mdat55();
        reading = u.f;
    }
    catch (STATUS const& v) {
        return v;
    }
    catch (std::exception const&) {
        return ERR_DEVICEERROR;
    }
    return NOERR;
}

#2 Updated by Richard Neswold over 1 year ago

Greg, do you still want this driver written?



Also available in: Atom PDF