home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
x10rex.zip
/
EXAMPLE.CMD
next >
Wrap
OS/2 REXX Batch file
|
1995-02-07
|
2KB
|
45 lines
/* Copyright (C) - 1994 by Douglas A. Bebber. All rights reserved */
/* Home Automation SDK (TM) - REXX Example Program */
/* This example simply turns on, then off, the device at */
/* HouseCode B, UnitNumber 1. */
/* NOTE: In order for this code to actually do anything you must */
/* have a DBTX10A controller card installed in the PC. */
/* You must also have the DBTX10A controller card I/O address */
/* set to 300 hex (768 decimal) or change the I/O port reference */
/* to the appropriate address in the following code. */
/* You must also have access to the X10OS2 Dynamic Link Library */
/* (X10OS2.DLL). */
/* First register the X-10 external REXX functions */
call RxFuncAdd 'X10AddFuncs', 'X10OS2', 'X10AddFuncs'
call X10AddFuncs
/* Now synchronize the hardware and software */
/* We will use the DBTX10A default address of 300 hex (768 decimal) */
/* note that if the DBTX10A controller card is at a different address */
/* that address must be substituted for the default used in this example. */
call RxSynchronize '768'
/* Now we will set the appropriate device (HouseCode=B, Unit=1) */
call RxSendX10Command '768', '7', '6', '2'
X10Command = RxRetrieveX10Command('768')
/* Now turn that device on... */
call RxSendX10Command '768', '7', '20', '2'
say Press a key to turn the device OFF...
pull
/* Now shut it off */
call RxSendX10Command '768', '7', '28', '2'
/* Ok we are finished. We will now deregister the X-10 external REXX */
/* Functions. */
call X10DropFuncs