class NSEmulatorReceiver extends BroadcastReceiver {

    public static BgReading bgReadingInsertFromData(long timestamp, double sgv, double slope, boolean do_notification) {
        Log.d(TAG, "bgReadingInsertFromData called timestamp = " + timestamp + " bg = " + sgv + " time =" + JoH.dateTimeText(timestamp));
        final JSONObject faux_bgr = new JSONObject();
        try {
            faux_bgr.put("timestamp", timestamp);
            faux_bgr.put("calculated_value", sgv);
            faux_bgr.put("filtered_calculated_value", sgv);
            faux_bgr.put("calculated_value_slope", slope);
            // sanity checking???
            // fake up some extra data
            faux_bgr.put("raw_data", sgv);
            faux_bgr.put("age_adjusted_raw_value", sgv);
            faux_bgr.put("filtered_data", sgv);

            faux_bgr.put("uuid", UUID.randomUUID().toString());
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            UserError.Log.e(TAG, "bgReadingInsertFromData Got JSON exception: " + e);
            return null;
        }

        Log.d(TAG, "Received NSEmulator SGV: " + faux_bgr);
        return bgReadingInsertFromJson(faux_bgr.toString(), do_notification, true); // notify and force sensor
    }

}