sensorInfo = sensors.getSensorInfo(side,sensor,"cardType","name","distance","SensorRange","loc","activereading")
Copy and pasting this from another thread, but that should be enough to go on if you know CC LUA. If not, I'll just tell you it works in a similar to rednet.receive()