TimeTrex API Manual

APITimeClockUnAuthenticated_TTUS100 extends APITimeClockUnAuthenticated

Table of Contents

$mode_flag_map  : mixed
$type_ids  : mixed
$company_obj  : mixed
$mode_flag  : mixed
$station_obj  : mixed
$test_mode  : mixed
$user_id_to_timeclock_user_id_map  : mixed
__construct()  : mixed
APITimeClockUnAuthenticated constructor.
checkStationType()  : bool
getCompanyObject()  : bool|null
getConfig()  : bool
getDate()  : int
getFirmware()  : array<string|int, mixed>|bool
getFirmwareFile()  : string
getFirmwareVersion()  : bool
getLatestFirmwareVersion()  : string
getMessage()  : array<string|int, mixed>
getModeFlagMap()  : mixed
getStationObject()  : bool|null
getTimeZone()  : array<string|int, mixed>
getUserIdentification()  : array<string|int, mixed>|bool
The clock needs to pass a list of new users that were just added to it, so the identification for those users is included no matter what, along with any new data.
getUserIdForEmployeeNumber()  : bool|int
getUsers()  : array<string|int, mixed>|bool
Accept a list of valid_user_ids from getUserIDs() so we can always send data for those users.
isLatestData()  : array<string|int, mixed>
isLatestFirmwareVersion()  : bool
ping()  : bool
PING function to test internet connection.
setAttendance()  : bool
setLog()  : bool
setUserIdentification()  : bool
convertTimeClockUserIDToUserID()  : array<string|int, mixed>|bool|int
convertUserIdToTimeClockUserID()  : bool|int
getNextTimeClockUserId()  : bool|int
getStatusAndType()  : array<string|int, mixed>
getUserIdToTimeClockUserIdMap()  : bool
getUserIdToTimeClockUserIdMapInitializationDate()  : bool|int
processPunches()  : bool
setTimeClockUserIdForUser()  : bool

Properties

$mode_flag_map

public mixed $mode_flag_map = [ //We can use: OEMCode to set version numbers and such on the clock. //1 is the default options that need to be set first so all values are reset to factory defaults. //Barcode device support, add to auto.sh: //mknod /dev/input/evdev c 13 64 //if [ ! -c /dev/input/evdev2 ]; then // mknod /dev/input/evdev2 c 13 65 //fi //Start firmware with debug logging to file: cd $DEST && chmod u+x $DEST/main && $DEST/main >> $DEST/main.log 2>&1 & // //US100: If locked out of the clock menu press in order: PowerKey->F1->F2->F3->F4->MenuKey //US100C: ESC->UP->DOWN->UP->DOWN->MENU // 1 => [ //Make UserID support up to 9 digits by default, the maximum. //When PIN's greater than 5 digits are detected the clock just switches to using PIN2 field instead of PIN //So getUser() needs to take this into account. //array('name' => 'OEMCode', 'value' => 'US100' ), //Product name. ['name' => '~PIN2Width', 'value' => 9], ['name' => '~MustChoiceInOut', 'value' => 0], ['name' => 'WorkCode', 'value' => 0], ['name' => '~ExtendFmt', 'value' => 1], ['name' => '~LockFunOn', 'value' => 2], //Access Control options in menu. Required for selecting type verification methods. ['name' => '~UserExtFmt', 'value' => 1], //User Verification Methods Menu ['name' => 'ULG', 'value' => 1], //Needed for proper Time Period/TimeZone behavior ['name' => 'GTZ1', 'value' => '1:2:5'], //Default time periods for each user. ['name' => 'GVS', 'value' => 0], //Verification: FP or PW or RF - Need both GVS and GVS1 set to 0. ['name' => 'GVS1', 'value' => 0], //Verification: FP or PW or RF - Need both GVS and GVS1 set to 0. ['name' => 'Must1To1', 'value' => '0'], //Force 1:1 authentication on the clock. If the fingerprints exceed 3200 this must be enabled, or the clock will do it itself. ['name' => 'ShowScore', 'value' => 1], //Always show score to help diagnose fingerprint problems. ['name' => 'State0', 'value' => 'In'], ['name' => 'State1', 'value' => 'Out'], ['name' => 'State2', 'value' => ''], ['name' => 'State3', 'value' => ''], ['name' => 'State4', 'value' => ''], ['name' => 'State5', 'value' => ''], ['name' => 'State0ExtraField', 'value' => '1'], //Only ask for extra fields when punching IN. ['name' => 'State1ExtraField', 'value' => '0'], //For quantity fields, we will want to ask when punching out though? ['name' => 'State2ExtraField', 'value' => '0'], ['name' => 'State3ExtraField', 'value' => '1'], ['name' => 'State4ExtraField', 'value' => '0'], ['name' => 'State5ExtraField', 'value' => '1'], ['name' => 'ExtraField0', 'value' => ''], ['name' => 'ExtraField1', 'value' => ''], ['name' => 'ExtraField2', 'value' => ''], ['name' => 'ExtraField3', 'value' => ''], ['name' => 'ExtraField4', 'value' => ''], ['name' => 'ExtraField5', 'value' => ''], ['name' => 'ExtraField6', 'value' => ''], ['name' => 'ExtraField7', 'value' => ''], ['name' => 'ExtraField8', 'value' => ''], ['name' => 'ExtraField9', 'value' => ''], ['name' => 'PingDelay', 'value' => '30'], //How often the clock pings the server to determine connection is up. ['name' => 'SoapTimeOut', 'value' => '20'], ['name' => 'PunchMessageSoapTimeout', 'value' => '5'], //Timeout for just punch messages. ['name' => 'EnablePrePunchMessaging', 'value' => '0'], //Display schedule time before the punch if the employee is early/late ['name' => 'EnablePostPunchMessaging', 'value' => '0'], //Display messages/exceptions and total worked time per week ['name' => 'PrePunchMessageDisplayTimeout', 'value' => '5'], ['name' => 'PostPunchMessageDisplayTimeout', 'value' => '5'], //array('name' => 'PunchVerifiedDisplayTimeout', 'value' => '3' ), //Used 2 second timer, with no config option. ['name' => 'EnableOutputLogging', 'value' => '0'], ['name' => 'MinimumLogSpaceAvailable', 'value' => '10240'], //Kbytes. ['name' => '~DHCPFunOn', 'value' => '1'], //Enable DHCP in menu. //array('name' => 'DHCP', 'value' => '1' ), //Always enable DHCP ['IsSupportUSBBarcode', 'value' => '1'], //Enable USB barcode support. ['BarcodeIsProximity', 'value' => '0'], //USB Proximity card reader, default to on?: auto.sh must contain: mknod /dev/input/evdev c 13 64 ['BarcodeInitializeTimeout', 'value' => '7'], //USB device initialize timeout during boot, in seconds ['BarcodeInputStreamDelay', 'value' => '350'], //USB device input delay in milliseconds for determining when the input is complete. //Fingerprint sensor settings, required otherwise it may cause crashes. ['OImageWidth', 'value' => '636'], ['OImageHeight', 'value' => '479'], ['CPX0', 'value' => '47'], ['CPX1', 'value' => '596'], ['CPX2', 'value' => '0'], ['CPX3', 'value' => '635'], ['CPY0', 'value' => '478'], ['CPY1', 'value' => '478'], ['CPY2', 'value' => '0'], ['CPY3', 'value' => '0'], ['AlarmOpLog', 'value' => '0'], ], 2 => [['name' => '~MustChoiceInOut', 'value' => 1]], //This causes the status to timeout, without it the status never times out though, so with automatic status enabled the OUT status should maybe be disabled. 4 => [['name' => 'State1', 'value' => '']], //Disable Out State, so only In is available and TimeTrex can be forced to determine it everytime. //16-Aug-10: For some reason there is a bug that if just Lunch is enabled, the timeclock is making lunch punches break punches. //Doepker ran into this problem. 8 => [['name' => 'State2', 'value' => 'Break Out'], ['name' => 'State3', 'value' => 'Break In']], 16 => [['name' => 'State4', 'value' => 'Lunch Out'], ['name' => 'State5', 'value' => 'Lunch In']], 32 => [['name' => 'ExtraField0', 'value' => 'Branch?'], ['name' => '~ExtendFmt', 'value' => 1]], 64 => [['name' => 'ExtraField1', 'value' => 'Department?'], ['name' => '~ExtendFmt', 'value' => 1]], 128 => [['name' => 'ExtraField2', 'value' => 'Job?'], ['name' => '~ExtendFmt', 'value' => 1]], 256 => [['name' => 'ExtraField3', 'value' => 'Task?'], ['name' => '~ExtendFmt', 'value' => 1]], 512 => [['name' => 'ExtraField4', 'value' => 'Quantity?'], ['name' => '~ExtendFmt', 'value' => 1]], 1024 => [['name' => 'ExtraField5', 'value' => 'Bad Quantity?'], ['name' => '~ExtendFmt', 'value' => 1]], //2048 - Hold for ExtraField6 //4096 - Hold for ExtraField7 //8192 - Hold for ExtraField8 //16384 - Hold for ExtraField9 32768 => [['name' => 'GVS1', 'value' => 9]], //Verification: Fingerprint & Password 65536 => [['name' => 'GVS1', 'value' => 10]], //Verification: Fingerprint & Proximity Card 131072 => [['name' => 'GVS1', 'value' => 8]], //Verification: PIN & Fingerprint 262144 => [['name' => 'GVS1', 'value' => 11]], //Verification: Proximity Card & Password //524288 1048576 => [['name' => 'BarcodeIsProximity', 'value' => '1']], 2097152 => [['name' => 'EnablePrePunchMessaging', 'value' => '1']], 4194304 => [['name' => 'EnablePostPunchMessaging', 'value' => '1']], //8388608 //16777216 //33554432 //67108864 //134217728 //268435456 //536870912 1073741824 => [['name' => 'EnableOutputLogging', 'value' => '1']], ]

Methods

getConfig()

public getConfig(int $last_check_epoch[, array<string|int, mixed> $current_config = [] ]) : bool
Parameters
$last_check_epoch : int
$current_config : array<string|int, mixed> = []
Return values
bool

getFirmware()

public getFirmware([null $current_version = null ]) : array<string|int, mixed>|bool
Parameters
$current_version : null = null
Return values
array<string|int, mixed>|bool

getMessage()

public getMessage(string $user_id, int $punch_status, int $order) : array<string|int, mixed>
Parameters
$user_id : string

UUID

$punch_status : int
$order : int
Return values
array<string|int, mixed>

getUserIdentification()

The clock needs to pass a list of new users that were just added to it, so the identification for those users is included no matter what, along with any new data.

public getUserIdentification(int $last_update_epoch[, array<string|int, mixed> $clock_user_ids = [] ]) : array<string|int, mixed>|bool

The clock will need to do this automatically.

Parameters
$last_update_epoch : int
$clock_user_ids : array<string|int, mixed> = []
Return values
array<string|int, mixed>|bool

getUserIdForEmployeeNumber()

public getUserIdForEmployeeNumber( $employee_number) : bool|int
Parameters
$employee_number :
Return values
bool|int

getUsers()

Accept a list of valid_user_ids from getUserIDs() so we can always send data for those users.

public getUsers(int $last_update_epoch[, array<string|int, mixed> $clock_user_ids = [] ]) : array<string|int, mixed>|bool

as well as sending updated data based on last_update_epoch. Since users can be assigned/unassigned from clocks without updating their own data in some cases.

Parameters
$last_update_epoch : int
$clock_user_ids : array<string|int, mixed> = []
Return values
array<string|int, mixed>|bool

isLatestData()

public isLatestData(int $last_check_epoch[, int $clock_epoch = null ]) : array<string|int, mixed>
Parameters
$last_check_epoch : int

EPOCH

$clock_epoch : int = null

EPOCH

Return values
array<string|int, mixed>

convertTimeClockUserIDToUserID()

protected convertTimeClockUserIDToUserID(string|array<string|int, string> $timeclock_user_ids) : array<string|int, mixed>|bool|int
Parameters
$timeclock_user_ids : string|array<string|int, string>

UUID

Return values
array<string|int, mixed>|bool|int

convertUserIdToTimeClockUserID()

protected convertUserIdToTimeClockUserID(string $user_id) : bool|int
Parameters
$user_id : string

UUID

Return values
bool|int

getStatusAndType()

protected getStatusAndType(int $clock_status_id) : array<string|int, mixed>
Parameters
$clock_status_id : int
Return values
array<string|int, mixed>

getUserIdToTimeClockUserIdMapInitializationDate()

protected getUserIdToTimeClockUserIdMapInitializationDate() : bool|int
Return values
bool|int

setTimeClockUserIdForUser()

protected setTimeClockUserIdForUser(string $user_id) : bool
Parameters
$user_id : string

UUID

Return values
bool

Search results