TINE-Core meeting 26.4.2016 C-Lib changes: - problem with select() -> poll() - select() standard since the 1980s pass nfds, descriptor set (a la bit-pattern macro), read sets, write sets, err sets select returns nready on the passed sets (-1 on error) max nfds is 1024 - poll() pass nfds, array of descriptors, set the 'events' flag to POLLIN/ POLLOUT etc. return nready : but this contains errors ! poll returns only a certain category of errors. - problem with a client hanging up a TCP connection. - single threaded apps use common client/server descriptors 'addClientSocketsToSet', addServerSocketsToSet but due to array of poll rather than bit pattern of select, the call now takes an offset so the n += add() is wrong here ! ended up claiming there were another 4 descriptors which had only '0' (stdin) due to ??? these had an error .revents which dropped thru the poll() and ended up 'spinning' - format elevation for MCA single elements - property "P" is an MCA and wants to return an array of FLOATS but can return a single element - if caller 'monitors' a single element then server coerces the contract to get the entire array and informs client which element is wished for - question: what if one of the e.g. ion pumps has a problem (hardware_error)? either the entire array is 'bad' (hardware error) or 'okay' (what data is used in the array access?) Overload property "P" to deliver a FLOAT array or a FLTINT array (value-status doublet). monitor a single element as FLOAT is 'elevated' to an MCA of FLTINTs. The desired element and its status are plucked out of the incoming array. - last time: MACOS (Free BSD?) doesn't like in-situ memcpy (overlapped memory areas) e.g. prepare PropertyQuerySTructure array (first 64 bytes are the property name) but caller just wants a list of names (array of 64-char fixed length strings) for (i=0; i