awips2/edexOsgi/com.raytheon.uf.common.python/src/com/raytheon/uf/common/python/PythonNumpyFloatArray.java
Nate Jensen aaa442212a Issue #1446 Initial python within Jep implementation of data access framework
Change-Id: I7b6ddb25f0ec68419aab7e40f15f94cd16e155b8

Former-commit-id: e5237fceac [formerly 1c5339c02a8570e12f92559a3159006efdf0df77]
Former-commit-id: 12e0a100c4
2013-01-15 13:48:04 -06:00

82 lines
1.9 KiB
Java

/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.python;
import jep.INumpyable;
/**
* Simple wrapper of data to send to python
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 10, 2011 rjpeter Initial creation
* </pre>
*
* @author rjpeter
* @version 1.0
*/
public class PythonNumpyFloatArray implements INumpyable {
private float[] messageData;
private int nx;
private int ny;
public PythonNumpyFloatArray(float[] data, int nx, int ny) {
this.messageData = data;
this.nx = nx;
this.ny = ny;
}
/*
* (non-Javadoc)
*
* @see jep.INumpyable#getNumPy()
*/
@Override
public Object[] getNumPy() {
return new Object[] { messageData };
}
/*
* (non-Javadoc)
*
* @see jep.INumpyable#getNumpyX()
*/
@Override
public int getNumpyX() {
return nx;
}
/*
* (non-Javadoc)
*
* @see jep.INumpyable#getNumpyY()
*/
@Override
public int getNumpyY() {
return ny;
}
}