We report novel optoelectronic functions in a resonant-tunnelling triangular-barrier optoelectronic switch (R-TOPS). We successfully observed optically controlled S- and N-shaped negative differential resistances (NDRs) simultaneously in a single device. Different types of optoelectronic bistabilities originating from S- and N-shaped NDRs were obtained by changing the input light power. We also obtained the differential gain characteristics and latch characteristics from S-shaped NDR by changing the bias voltages. These characteristics with their different behaviours make it possible to realize novel optoelectronic switching.