RaspberryPi programs written by Knute Johnson
Skip navigation links
A B C D E F G H I K L M O P R S T U V W Z 

A

actionPerformed(ActionEvent) - Method in class com.knutejohnson.pi.MotionDetection.CaptureSizeAction
Called when one of the Capture Image Size radio buttons is clicked.
actionPerformed(ActionEvent) - Method in class com.knutejohnson.pi.MotionDetection.DisplaySizeAction
Called when the JRadioMenuItem is clicked.
activity - Variable in class com.knutejohnson.pi.Intercom
A JMenu that displays a moving symbol, changed when datagram packets are received
ActivityJMenu() - Constructor for class com.knutejohnson.pi.Intercom.ActivityJMenu
 
ALAW - Static variable in class com.knutejohnson.pi.Intercom
ALAW AudioFormat
ALPHA_COMP - Static variable in class com.knutejohnson.pi.MotionDetection
Alpha composite used to create composite image for the display
aspectRatio - Variable in class com.knutejohnson.pi.MotionDetection
Display aspect ratio
audioThread - Variable in class com.knutejohnson.pi.Intercom
Thread that reads the receive RingBuffer, converts the data to PCM_SIGNED format and writes it to the SourceDataLine
Auth(Properties) - Constructor for class com.knutejohnson.pi.MotionDetection.Auth
Create a new Auth object with the specified properties.
authBox - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JCheckbox to enable authentication with the email server
available() - Method in class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
Gets the number of bytes of data that may be read from the InputStream.

B

baos - Variable in class com.knutejohnson.pi.MotionDetection.BufferedImageSource
A temporary place to hold the data from the BufferedImage
brightNew - Variable in class com.knutejohnson.pi.MotionDetection
Current image box values
brightOld - Variable in class com.knutejohnson.pi.MotionDetection
Previous image box values
BufferedImageSource(BufferedImage) - Constructor for class com.knutejohnson.pi.MotionDetection.BufferedImageSource
Creates a new BufferedImageSource with the specified BufferedImage
builder - Variable in class com.knutejohnson.pi.MotionDetection.ProcessManager
ProcessBuilder

C

cameraThread - Variable in class com.knutejohnson.pi.MotionDetection
Main program thread
CAPTURE_SIZE_LABELS - Static variable in class com.knutejohnson.pi.MotionDetection
Capture size labels
captureHeight - Variable in class com.knutejohnson.pi.MotionDetection
Capture image height
CaptureSizeAction(String) - Constructor for class com.knutejohnson.pi.MotionDetection.CaptureSizeAction
Create a new CaptureSizeAction
captureWidth - Variable in class com.knutejohnson.pi.MotionDetection
Capture image width
close() - Method in class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
Closes this stream
close() - Method in class com.knutejohnson.pi.Intercom.RingBuffer.OutputStream
Closes this stream.
closedFlag - Variable in class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
Flag to mark a closed stream
closedFlag - Variable in class com.knutejohnson.pi.Intercom.RingBuffer.OutputStream
Flag to mark a closed stream
com.knutejohnson.pi - package com.knutejohnson.pi
 
createCompositeImage(BufferedImage, BufferedImage, List<Point>, int, int) - Method in class com.knutejohnson.pi.MotionDetection
Draws img2 and blue boxes specified by the List points onto img1
createHandledProcess(String...) - Static method in class com.knutejohnson.pi.MotionDetection.ProcessManager
Creates a ProcessManager with the error stream redirected to the input stream and starts that manager.

D

DATE - Static variable in class com.knutejohnson.pi.Intercom
Program Date
DATE - Static variable in class com.knutejohnson.pi.MotionDetection
Program date
DATE_PATTERN - Static variable in class com.knutejohnson.pi.MotionDetection
Date pattern for saved image files
debugBox - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JCheckbox to enable JavaMail debug messages to be displayed
DEFAULT_ADDRESS - Static variable in class com.knutejohnson.pi.Intercom
Default destination address
DEFAULT_PORT - Static variable in class com.knutejohnson.pi.Intercom
Default port number
directory - Variable in class com.knutejohnson.pi.MotionDetection
Directory where captured images are written
DISPLAY_SIZE_LABELS - Static variable in class com.knutejohnson.pi.MotionDetection
Display size labels
displayHeight - Variable in class com.knutejohnson.pi.MotionDetection
Display image height
DisplaySizeAction(String) - Constructor for class com.knutejohnson.pi.MotionDetection.DisplaySizeAction
Creates a new DisplaySizeAction
displayWidth - Variable in class com.knutejohnson.pi.MotionDetection
Display image width
dotColor - Variable in class com.knutejohnson.pi.MotionDetection.ImageJPanel
Color of the dot to display in the upper right corner

E

emailImage - Variable in class com.knutejohnson.pi.MotionDetection
Flag if images are to be emailed
emailImage() - Method in class com.knutejohnson.pi.MotionDetection
Sends the captured image(s) via email using the entered settings.
EmailSettings(Properties) - Constructor for class com.knutejohnson.pi.MotionDetection.EmailSettings
Create a new EmailSettings JPanel with the specified Properties.
emailThread - Variable in class com.knutejohnson.pi.MotionDetection
Email thread

F

fileChooser - Variable in class com.knutejohnson.pi.MotionDetection
File chooser for saved images directory
fromField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextField for the sender's email address

G

getContentType() - Method in class com.knutejohnson.pi.MotionDetection.BufferedImageSource
Gets the content type of the converted image, in this case image/jpeg
getInputStream() - Method in class com.knutejohnson.pi.Intercom.RingBuffer
Gets the InputStream from this buffer
getInputStream() - Method in class com.knutejohnson.pi.MotionDetection.BufferedImageSource
Gets an InputStream from which to read the image data
getName() - Method in class com.knutejohnson.pi.MotionDetection.BufferedImageSource
Gets the name of the data, usually a file name but in this case a generic file name of "image.jpg".
getOutputStream() - Method in class com.knutejohnson.pi.Intercom.RingBuffer
Gets this buffer's OutputStream
getOutputStream() - Method in class com.knutejohnson.pi.MotionDetection.BufferedImageSource
Get the OutputStream associated with this data source, in this case there is no OutputStream and calling this method just throws an IOException.
getPasswordAuthentication() - Method in class com.knutejohnson.pi.MotionDetection.Auth
Gets a PasswordAuthentication object.

H

handleInput() - Method in class com.knutejohnson.pi.MotionDetection.ProcessManager
Creates a thread to read the output of the Process and send it to standard output.
head - Variable in class com.knutejohnson.pi.Intercom.RingBuffer
The head of the buffer where data is read from first
hints - Variable in class com.knutejohnson.pi.MotionDetection
RenderingHints for all image drawing
hostField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextField to input the email server host address

I

image - Variable in class com.knutejohnson.pi.MotionDetection.ImageJPanel
Image to display
IMAGE_FILE - Static variable in class com.knutejohnson.pi.MotionDetection
 
IMAGE_FILE_FORMATTER - Static variable in class com.knutejohnson.pi.MotionDetection
Date format for saved image files
ImageJPanel() - Constructor for class com.knutejohnson.pi.MotionDetection.ImageJPanel
 
imageNew - Variable in class com.knutejohnson.pi.MotionDetection
Current image
imageOld - Variable in class com.knutejohnson.pi.MotionDetection
Previous image
imagePanel - Variable in class com.knutejohnson.pi.MotionDetection
Display panel for images
imageQueue - Variable in class com.knutejohnson.pi.MotionDetection
Queue for images to be emailed
index - Variable in class com.knutejohnson.pi.Intercom.ActivityJMenu
Index of the next characther to display
INI_FILE_NAME - Static variable in class com.knutejohnson.pi.MotionDetection
INI file name
InputStream() - Constructor for class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
 
Intercom - Class in com.knutejohnson.pi
Intercom is a simple Java program to send voice over IP to a remote copy of the Intercom program.
Intercom() - Constructor for class com.knutejohnson.pi.Intercom
Creates a new Intercom GUI and three of the data transfer threads
Intercom.ActivityJMenu - Class in com.knutejohnson.pi
A JMenu used to signal an activity occuring in the program.
Intercom.RingBuffer - Class in com.knutejohnson.pi
This RingBuffer is an unprotected circular buffer used to move byte data to and from streams.
Intercom.RingBuffer.InputStream - Class in com.knutejohnson.pi
An InputStream to read data from this buffer
Intercom.RingBuffer.OutputStream - Class in com.knutejohnson.pi
An OutputStream to write data to this buffer
is - Variable in class com.knutejohnson.pi.Intercom.RingBuffer
An InputStream to read data from the RingBuffer

K

Keys() - Constructor for enum com.knutejohnson.pi.MotionDetection.Keys
 

L

loadProperties(Properties) - Method in class com.knutejohnson.pi.Intercom
Loads the program properties from a data file

M

main(String...) - Static method in class com.knutejohnson.pi.Intercom
Main program entry point, creates a new Intercom and starts it running.
main(String...) - Static method in class com.knutejohnson.pi.MotionDetection
Main program entry point
maxBoxes - Variable in class com.knutejohnson.pi.MotionDetection
Maximum boxes value
minBoxes - Variable in class com.knutejohnson.pi.MotionDetection
Minimum boxes value
MotionDetection - Class in com.knutejohnson.pi
MotionDetection is a program for the RaspberryPi computer and camera to take a series of photos and detect motion in the images.
MotionDetection() - Constructor for class com.knutejohnson.pi.MotionDetection
Creates a new MotionDetection program
MotionDetection.Auth - Class in com.knutejohnson.pi
An authenticator class used to obtain user name a password for sending email.
MotionDetection.BufferedImageSource - Class in com.knutejohnson.pi
A DataSource to prepare a BufferedImage for emailing.
MotionDetection.CaptureSizeAction - Class in com.knutejohnson.pi
Action for the Capture Image Size JRadioMenuItems to set the capture size and adjust the display aspect ratio appropriately for the image.
MotionDetection.DisplaySizeAction - Class in com.knutejohnson.pi
Called when one of the Display Width radio buttons is clicked.
MotionDetection.EmailSettings - Class in com.knutejohnson.pi
A JPanel containing the GUI components to input email settings.
MotionDetection.ImageJPanel - Class in com.knutejohnson.pi
A specilized JPanel used to display the latest captured image and draw a dot in the upper right corner to signal a capture or an overload
MotionDetection.Keys - Enum in com.knutejohnson.pi
Timing data map keys, used for testing
MotionDetection.ProcessManager - Class in com.knutejohnson.pi
ProcessManager is a class that combines the features of ProcessBuilder and Process and adds methods to handle the input and error streams.

O

os - Variable in class com.knutejohnson.pi.Intercom.RingBuffer
An OutputStream to write data to the RingBuffer
OutputStream() - Constructor for class com.knutejohnson.pi.Intercom.RingBuffer.OutputStream
 

P

paintComponent(Graphics) - Method in class com.knutejohnson.pi.MotionDetection.ImageJPanel
Performs the actual drawing of the image on the panel
passwdField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JPasswordField to input the email user's password
PCM - Static variable in class com.knutejohnson.pi.Intercom
PCM_SIGNED AudioFormat
portField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextfield to input the email server port
process - Variable in class com.knutejohnson.pi.MotionDetection.ProcessManager
Process
processImage() - Method in class com.knutejohnson.pi.MotionDetection
Read the latest image file from the ramdisk and process it for motion detection.
ProcessManager(String...) - Constructor for class com.knutejohnson.pi.MotionDetection.ProcessManager
Creates a new ProcessManager with the specified commands
PROCESSORS - Static variable in class com.knutejohnson.pi.MotionDetection
Number of processors
processorThread - Variable in class com.knutejohnson.pi.MotionDetection
Image processor thread
properties - Variable in class com.knutejohnson.pi.Intercom
Program properties
properties - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
Properties object that holds the email settings
properties - Variable in class com.knutejohnson.pi.MotionDetection
Properties to store values set from menus
PROPERTIES_FILE - Static variable in class com.knutejohnson.pi.Intercom
Properties file
props - Variable in class com.knutejohnson.pi.MotionDetection.Auth
Properties containing the mail.user and mail.passwd properties
protocolsField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextField to input the enabled SSL protocols

R

read() - Method in class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
Read a single byte from the buffer.
read(byte[], int, int) - Method in class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
Reads len bytes into the byte buffer starting at the off.
read(byte[]) - Method in class com.knutejohnson.pi.Intercom.RingBuffer.InputStream
Read bytes from the stream storing them into buf.
receiveThread - Variable in class com.knutejohnson.pi.Intercom
Thread that reads DatagramPackets and writes the data to the receive RingBuffer
redirectErrorStream(boolean) - Method in class com.knutejohnson.pi.MotionDetection.ProcessManager
Sets the redirectErrorStream property, if true stdout and stderr from this process will be merged.
RingBuffer(int) - Constructor for class com.knutejohnson.pi.Intercom.RingBuffer
Creates a new RingBuffer of the specified size in bytes
ringBuffer - Variable in class com.knutejohnson.pi.Intercom.RingBuffer
The RingBuffer's buffer
ROT - Static variable in class com.knutejohnson.pi.MotionDetection
Number of bits to rotate password string
rotateLeft(String, int) - Method in class com.knutejohnson.pi.MotionDetection
A method to obfuscate String data by rotating the bits in each character of the String to the left.
rotateRight(String, int) - Method in class com.knutejohnson.pi.MotionDetection
A method to obfuscate String data by rotating the bits in each character of the String to the right.
rotl7(byte, int) - Method in class com.knutejohnson.pi.MotionDetection
Method to rotate the seven lower order bits of a byte by the specified number of bits to the left.
rotr7(byte, int) - Method in class com.knutejohnson.pi.MotionDetection
Method to rotate the seven lower order bits of a byte by the specified number of bits to the right.
run() - Method in class com.knutejohnson.pi.Intercom
Reads data from the TargetDataLine (microphone) and writes that data to the transmit RingBuffer when the talk button is pressed.
run() - Method in class com.knutejohnson.pi.MotionDetection
The camera thread controls the process that runs the raspistill program.
runFlag - Variable in class com.knutejohnson.pi.Intercom
Flag to control the thread reading data from the TargetDataLine
runFlag - Variable in class com.knutejohnson.pi.MotionDetection
Main thread run flag
rxBuf - Variable in class com.knutejohnson.pi.Intercom
Receive RingBuffer to access received audio data in a AudioInptStream so that the format can be change back to PCM_SIGNED
rxSocket - Variable in class com.knutejohnson.pi.Intercom
DatagramSocket used to receive packets of audio data from another copy of Intercom

S

saveFile - Variable in class com.knutejohnson.pi.MotionDetection
Flag if images are to be saved
saveImage(BufferedImage, File) - Method in class com.knutejohnson.pi.MotionDetection
Writes an image to the specified directory with the file name created from the local date and time in a background thread.
sendThread - Variable in class com.knutejohnson.pi.Intercom
Thread that reads data from the transmit RingBuffer, assembles it into a DatagramPacket and transmits it
serialVersionUID - Static variable in class com.knutejohnson.pi.MotionDetection.CaptureSizeAction
Serial version UID
serialVersionUID - Static variable in class com.knutejohnson.pi.MotionDetection.DisplaySizeAction
Serial version UID
serialVersionUID - Static variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
Serial version UID
serialVersionUID - Static variable in class com.knutejohnson.pi.MotionDetection.ImageJPanel
Serial version UID
serialVersionUID - Static variable in class com.knutejohnson.pi.MotionDetection
Serial version UID
setImage(BufferedImage, Color) - Method in class com.knutejohnson.pi.MotionDetection.ImageJPanel
Create a new ImageJPanel with the specified image and dot color
showComposite - Variable in class com.knutejohnson.pi.MotionDetection
Flag if composite images are to be displayed
start() - Method in class com.knutejohnson.pi.Intercom
Starts the three transfer threads.
start() - Method in class com.knutejohnson.pi.MotionDetection.ProcessManager
Starts the process using the commands set by the constructor.
start() - Method in class com.knutejohnson.pi.MotionDetection
Starts the camera thread and the image processing thread
starttlsBox - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JCheckBox to enable StartTLS communication with the email server
stop() - Method in class com.knutejohnson.pi.MotionDetection
Kill the raspistill program, stop the camera thread, the image processing thread, delete any remaining files on the ramdisk, unmount the ramdisk and remove it.
storeProperties(Properties) - Method in class com.knutejohnson.pi.Intercom
Stores the program properties to a data file
storeProperties() - Method in class com.knutejohnson.pi.MotionDetection
Store the program properties to the INI file
subjectField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextField for the subject of the email

T

tail - Variable in class com.knutejohnson.pi.Intercom.RingBuffer
The tail of the buffer where new data is written to the buffer
tdl - Variable in class com.knutejohnson.pi.Intercom
TargetDataLine to collect audio from the microphone
text - Static variable in class com.knutejohnson.pi.Intercom.ActivityJMenu
Characters to display in the ActivityJMenu
threshold - Variable in class com.knutejohnson.pi.MotionDetection
Threshold value
TIME_STAMP_FORMATTER - Static variable in class com.knutejohnson.pi.MotionDetection
Date format for image time stamps
TIME_STAMP_PATTERN - Static variable in class com.knutejohnson.pi.MotionDetection
Date patter for image time stamps
timesFlag - Static variable in class com.knutejohnson.pi.MotionDetection
Flag to print processing times on console
timeStampFont - Static variable in class com.knutejohnson.pi.MotionDetection
Default time stamp font
timeStampImage - Variable in class com.knutejohnson.pi.MotionDetection
Flag if images are to be time stamped
timingMap - Variable in class com.knutejohnson.pi.MotionDetection
Timing data map, used for testing
toField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextField for the receiver's email address
TRANSLUCENT_GREEN - Static variable in class com.knutejohnson.pi.MotionDetection
Translucent green color for dot
TRANSLUCENT_RED - Static variable in class com.knutejohnson.pi.MotionDetection
Translucent red color for dot
TRANSPARENT_BLACK - Static variable in class com.knutejohnson.pi.MotionDetection
Transparent black color for dot
txBuf - Variable in class com.knutejohnson.pi.Intercom
Transmit RingBuffer to access audio data from TargetDataLine in a AudioInputStream so that the format can be changed to ULAW
TXFER_DIR - Static variable in class com.knutejohnson.pi.MotionDetection
Transfer directory

U

ULAW - Static variable in class com.knutejohnson.pi.Intercom
ULAW AudioFormat
update() - Method in class com.knutejohnson.pi.Intercom.ActivityJMenu
Update the display by showing the next character
updateProperties() - Method in class com.knutejohnson.pi.MotionDetection.EmailSettings
Method to extract the new email settings from the GUI and store them in the passed in Properties.
USER_HOME - Static variable in class com.knutejohnson.pi.Intercom
User home directory
userField - Variable in class com.knutejohnson.pi.MotionDetection.EmailSettings
JTextField to input the email user name

V

valueOf(String) - Static method in enum com.knutejohnson.pi.MotionDetection.Keys
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.knutejohnson.pi.MotionDetection.Keys
Returns an array containing the constants of this enum type, in the order they are declared.
VERSION - Static variable in class com.knutejohnson.pi.Intercom
Program Version
VERSION - Static variable in class com.knutejohnson.pi.MotionDetection
Program version

W

waitFor() - Method in class com.knutejohnson.pi.MotionDetection.ProcessManager
Causes the current thread to wait until the process has terminated.
write(int) - Method in class com.knutejohnson.pi.Intercom.RingBuffer.OutputStream
Write a single byte to the buffer.
write(byte[], int, int) - Method in class com.knutejohnson.pi.Intercom.RingBuffer.OutputStream
Write bytes from a byte array to this stream.
write(byte[]) - Method in class com.knutejohnson.pi.Intercom.RingBuffer.OutputStream
Write the contents of the byte array to the buffer.

Z

ZEROS - Static variable in class com.knutejohnson.pi.Intercom
250ms of byte zeros
A B C D E F G H I K L M O P R S T U V W Z 
Skip navigation links