/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2007 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// // Definition of the CAS (component access shell). // The CAS allows to interactively inspect and modify the actors at runtime // via a TCP port. // Encapsulate all actors defining the CAS in an own namespace: actor_ident "kit_base.capsule" actor_param { active 1 scope "cas" local_name "capsule" deleg_target "" child_ident "kit_base.group" child_param { // Delegate action calls to the children. active 1 child_array { // Producer for CAS objects: ident "kit_base.producer" param { active 1 name "connection_producer" deleg_name "connectionset" ident "kit_base.capsule" param { active 1 scope "cas_connection" local_name "capsule" deleg_target "dispatch_export" child_ident "kit_base.group" child_param { // Delegate action calls to the children. active 1 child_array { // Dispatcher for commands from outside // the capsule: ident "kit_base.dispatch" param { name "dispatch_export" entry_array { // Assign the socket object. cmds "set_tcpstream" targets "tcpinput" } } } { // Dispatcher within the CAS capsule. ident "kit_base.dispatch" param { name "dispatch" entry_array { // If the connection is lost or closed, // destroy the CAS object. cmds "notify_lost" "notify_closed" targets "capsule" newcmd "destroy" } } } { // The CAS shell evaluating commands. ident "kit_com.shell" param { name "shell" write_line_cmd "write_line" quit_cmd "close" start_actor "^^root" } } { // CAS socket and line parser: ident "kit_com.tcpinput" param { active 1 name "tcpinput" extcfg_actor "^^cfg" extcfg_entry_addrport "" extcfg_entry_echo "cas.echo" extcfg_entry_telnet "cas.telnet" interpreter "shell" welcome "Welcome to the Shark 3D " & "component access shell (CAS)." "Type 'help' for help." prompt "Shark3D-CAS> " notify "dispatch" } } } } } } { // Listen socket waiting for incoming connections: ident "kit_com.tcplisten" param { active 1 ignore_socket_errors 1 extcfg_actor "^cfg" extcfg_entry_addrport "cas.addrport" producer "connection_producer" } } } }